mirror of
https://github.com/uiverse-io/galaxy.git
synced 2025-11-28 05:00:22 +08:00
60 lines
1.3 KiB
HTML
60 lines
1.3 KiB
HTML
<div class="form-control">
|
|
<input class="input input-alt" placeholder="Type something intelligent" required="" type="text">
|
|
<span class="input-border input-border-alt"></span>
|
|
</div>
|
|
|
|
<style>
|
|
/* From Uiverse.io by adamgiebl - Tags: gradient, input, modern, animated */
|
|
.input {
|
|
color: #fff;
|
|
font-size: 0.9rem;
|
|
background-color: transparent;
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
padding-inline: 0.5em;
|
|
padding-block: 0.7em;
|
|
border: none;
|
|
border-bottom: var(--border-height) solid var(--border-before-color);
|
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.input-border {
|
|
position: absolute;
|
|
background: var(--border-after-color);
|
|
width: 0%;
|
|
height: 2px;
|
|
bottom: 0;
|
|
left: 0;
|
|
transition: width 0.3s cubic-bezier(0.6, -0.28, 0.735, 0.045);
|
|
}
|
|
|
|
.input:focus {
|
|
outline: none;
|
|
}
|
|
|
|
.input:focus + .input-border {
|
|
width: 100%;
|
|
}
|
|
|
|
.form-control {
|
|
position: relative;
|
|
--width-of-input: 300px;
|
|
}
|
|
|
|
.input-alt {
|
|
font-size: 1.2rem;
|
|
padding-inline: 1em;
|
|
padding-block: 0.8em;
|
|
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.input-border-alt {
|
|
height: 3px;
|
|
background: linear-gradient(90deg, #FF6464 0%, #FFBF59 50%, #47C9FF 100%);
|
|
transition: width 0.4s cubic-bezier(0.42, 0, 0.58, 1.00);
|
|
}
|
|
|
|
.input-alt:focus + .input-border-alt {
|
|
width: 100%;
|
|
}
|
|
</style>
|