d13100ebf3
Update draft releases / main (push) Has been cancelled
Build and push docs image / build-image (push) Has been cancelled
Build Web Application / build-web (macos-latest) (push) Has been cancelled
Build Web Application / build-web (ubuntu-latest) (push) Has been cancelled
Python Code Quality Checks / build (push) Has been cancelled
Test Python / test-python (macos-latest, 3.10) (push) Has been cancelled
Test Python / test-python (macos-latest, 3.11) (push) Has been cancelled
Test Python / test-python (ubuntu-latest, 3.10) (push) Has been cancelled
Test Python / test-python (ubuntu-latest, 3.11) (push) Has been cancelled
22 lines
618 B
CSS
22 lines
618 B
CSS
.hover-underline-gradient {
|
|
z-index: 1;
|
|
}
|
|
.hover-underline-gradient::after {
|
|
content: '';
|
|
display: block;
|
|
width: 0; /* 在 hover 之前宽度为 0 */
|
|
height: 80%;
|
|
background-image: linear-gradient(to right, theme('colors.gradientL'), theme('colors.gradientR')); /* 渐变背景 */
|
|
border-radius: 10px; /* 设置为 full rounded corners */
|
|
transition: width 0.3s ease-in-out; /* 过渡效果 */
|
|
position: absolute;
|
|
bottom: -10px;
|
|
z-index: -1;
|
|
margin: 0 auto;
|
|
/* clip-path: inset(50% 0 0 0); */
|
|
}
|
|
|
|
.hover-underline-gradient:hover::after {
|
|
width: 90%; /* hover 时宽度为元素的 100% */
|
|
}
|