← Retour galerie
Formulaires · html-css · intermediate
Login Neon
Formulaire de connexion glass, labels flottants, bordure glow
Aperçu live
Code
:root {
--ink: #050607;
--acid: #b8ff2e;
--panel: rgba(12, 14, 18, 0.85);
--line: rgba(255, 255, 255, 0.1);
--muted: rgba(255, 255, 255, 0.45);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
min-height: 100vh;
display: grid;
place-items: center;
padding: 1.5rem;
font-family: "Segoe UI", system-ui, sans-serif;
color: #fff;
background:
radial-gradient(ellipse 60% 50% at 50% -10%, rgba(184, 255, 46, 0.18), transparent 55%),
radial-gradient(ellipse 40% 40% at 100% 100%, rgba(80, 100, 255, 0.12), transparent 50%),
var(--ink);
overflow: hidden;
}
.noise {
position: fixed;
inset: 0;
opacity: 0.04;
pointer-events: none;
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.shell {
width: min(100%, 400px);
position: relative;
z-index: 1;
}
.shell::before {
content: "";
position: absolute;
inset: -2px;
border-radius: 28px;
background: linear-gradient(135deg, rgba(184, 255, 46, 0.55), transparent 40%, rgba(100, 160, 255, 0.4));
z-index: -1;
filter: blur(0.5px);
animation: borderGlow 4s ease-in-out infinite alternate;
}
@keyframes borderGlow {
from { opacity: 0.55; }
to { opacity: 1; }
}
form {
background: var(--panel);
border: 1px solid var(--line);
border-radius: 26px;
padding: 2rem 1.75rem 1.75rem;
backdrop-filter: blur(20px);
box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}
.head {
text-align: center;
margin-bottom: 1.75rem;
}
.logo {
width: 48px;
height: 48px;
margin: 0 auto 1rem;
border-radius: 14px;
background: linear-gradient(145deg, var(--acid), #5aa80a);
box-shadow: 0 0 30px rgba(184, 255, 46, 0.4);
display: grid;
place-items: center;
font-weight: 900;
color: #06100a;
}
h1 {
font-size: 1.45rem;
font-weight: 850;
letter-spacing: -0.02em;
margin-bottom: 0.35rem;
}
.head p {
color: var(--muted);
font-size: 0.9rem;
}
.field {
position: relative;
margin-bottom: 1.1rem;
}
.field input {
width: 100%;
padding: 1.15rem 1rem 0.55rem;
border-radius: 14px;
border: 1px solid var(--line);
background: rgba(0, 0, 0, 0.35);
color: #fff;
font-size: 0.95rem;
outline: none;
transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.field label {
position: absolute;
left: 1rem;
top: 50%;
transform: translateY(-50%);
color: var(--muted);
font-size: 0.92rem;
pointer-events: none;
transition: transform 0.2s ease, font-size 0.2s ease, color 0.2s ease, top 0.2s ease;
}
.field input:focus,
.field input:not(:placeholder-shown) {
border-color: rgba(184, 255, 46, 0.55);
box-shadow: 0 0 0 3px rgba(184, 255, 46, 0.12);
background: rgba(0, 0, 0, 0.45);
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label {
top: 0.55rem;
transform: none;
font-size: 0.68rem;
letter-spacing: 0.06em;
text-transform: uppercase;
color: var(--acid);
}
.field input::placeholder { color: transparent; }
.row {
display: flex;
justify-content: space-between;
align-items: center;
margin: 0.25rem 0 1.35rem;
font-size: 0.82rem;
}
.row label {
display: flex;
align-items: center;
gap: 0.45rem;
color: var(--muted);
cursor: pointer;
}
.row a {
color: var(--acid);
text-decoration: none;
font-weight: 650;
}
.row a:hover { text-decoration: underline; }
.submit {
width: 100%;
padding: 0.95rem;
border: none;
border-radius: 14px;
background: linear-gradient(135deg, var(--acid), #8fd418);
color: #06100a;
font-weight: 850;
font-size: 0.98rem;
cursor: pointer;
box-shadow: 0 0 32px rgba(184, 255, 46, 0.3);
transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.submit:hover {
transform: translateY(-2px);
filter: brightness(1.05);
box-shadow: 0 0 48px rgba(184, 255, 46, 0.45);
}
.submit:active { transform: scale(0.98); }
.alt {
text-align: center;
margin-top: 1.25rem;
font-size: 0.85rem;
color: var(--muted);
}
.alt a {
color: #fff;
font-weight: 700;
text-decoration: none;
}
Envie de tweak les tokens ? Code Studio
