添加浮动标签动画样式

This commit is contained in:
shuaiplus committed 2025-05-25 14:31:09 +08:00
1 parent 221a8c8c50
commit 9abaaf4c92
3 files changed
+47 -7

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
/* 浮动标签动画样式 */
.input-group {
position: relative;
}
.input-group .floating-label {
position: absolute;
top: 14px;
left: 16px;
pointer-events: none;
}
.input-group .floating-label span {
display: inline-block;
font-size: 1.1rem;
color: #888;
transition: 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
min-width: 5px;
}
.input-group input:focus + .floating-label span,
.input-group input:not(:placeholder-shown) + .floating-label span {
color: #30a8f7;
transform: translateY(-35px);
}
+3 -1
View File
@@ -935,9 +935,11 @@ body {
display: flex;
flex-direction: column;
align-items: flex-start;
position: relative;
margin-bottom: 10px;
}
.input-group label {
.input-group label:not(.floating-label) {
font-size: 0.98rem;
color: #888;
margin-bottom: 6px;