当前位置:网站首页>Mouse over effect III
Mouse over effect III
2022-07-01 02:38:00 【Ziwei front end】
Code display
<h3 class="hover">Hover Me</h3>
<style>
body {
height: 100vh;
margin: 0;
display: grid;
place-content: center;
}
h3 {
font-family: system-ui, sans-serif;
font-size: 3rem;
margin:0;
cursor: pointer;
padding: 0 .1em;
}
.hover {
--b: 0.1em; /* the thickness of the line */
--c: #1095c1; /* the color */
color: #fff;
padding-block: var(--b);
background: linear-gradient(red 0 0) 0% var(--_p,0%)/var(--_p,0%) var(--b) no-repeat;
position: relative;
transition: .3s var(--_s,0s) linear,background-size .3s calc(.3s - var(--_s,0s));
}
.hover:before {
content:"";
position: absolute;
z-index: -1;
inset:-100% 0 0;
background: linear-gradient(var(--c) 50%,#000 0);
transition: .3s var(--_s,0s) linear;
}
.hover:hover {
--_p: 100%;
--_s: .3s;
}
.hover:hover:before {
transform:translateY(50%);
}
</style>
边栏推荐
猜你喜欢
联想X86服务器重启管理控制器(XClarity Controller)或TSM的方法
PMP是什麼?
Dell服务器重启iDRAC方法
The operation efficiency of the park is improved, and the application platform management of applet container technology is accelerated
[JS] [Nuggets] get people who are not followers
详解数据治理知识体系
Pytoch -- foundation refers to the north_ II. What high school students can understand [back propagation and gradient descent]
PMP是什么?
(总结一)Halcon基础之寻找目标特征+转正
Densenet network paper learning notes
随机推荐
【微信小程序開發】樣式匯總
Viewing JVM parameters
SAP ALV summary is inconsistent with exported excel summary data
小程序自定义顶部导航栏,uni-app微信小程序自定义顶部导航栏
鼠标悬停效果十
先写API文档还是先写代码?
Xception学习笔记
旷世轻量化网络ShuffulNetV2学习笔记
nacos配置中心使用教程
Cluster method synchronous execution framework suona
robots. Txt restrict search engine inclusion
Rocketqa: cross batch negatives, de noised hard negative sampling and data augmentation
Optimal transport Series 1
[PR # 5 A] two way running (state pressure DP)
ANR问题的分析与解决思路
Youmeng (a good helper for real-time monitoring of software exceptions: crash) access tutorial (the easiest tutorial for Xiaobai with some foundation)
十大券商有哪些?另外想问,现在在线开户安全么?
Zero foundation self-study SQL course | window function
Thread Detach
Pulsar theme compression