当前位置:网站首页>鼠标悬停效果三
鼠标悬停效果三
2022-07-01 02:31:00 【紫微前端】

代码展示
<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>边栏推荐
- The latest wechat iPad protocol code obtains official account authorization, etc
- 【做题打卡】集成每日5题分享(第一期)
- 機器學習10-信念貝葉斯分類器
- What are the top ten securities companies? In addition, is it safe to open an account online now?
- C language a little bit (may increase in the future)
- Pulsar Geo Replication/灾备/地域复制
- @ConfigurationProperties和@Value的区别
- SWT/ANR问题--Dump时间过长导致的SWT
- Small program cloud development -- wechat official account article collection
- Sampling Area Lights
猜你喜欢

Leetcode 面试题 17.10. 主要元素

Desai wisdom number - other charts (parallel coordinate chart): employment of fresh majors in 2021

The mobile edge browser cannot open the third-party application

QML control type: tooltip

Dell服务器重启iDRAC方法

Optimal Transport系列1

Contrastive learning of Class-agnostic Activation Map for Weakly Supervised Object Localization and

pycharm 软件deployment 灰色 无法点

My PMP learning test experience

Rocketqa: cross batch negatives, de noised hard negative sampling and data augmentation
随机推荐
Windows quick add boot entry
SWT/ANR问题--ANR/JE引发SWT
SWT/ANR问题--Deadlock
How do the top ten securities firms open accounts? Also, is it safe to open an account online?
SWT / anr problem - SWT caused by too long dump time
LabVIEW计算相机图像传感器分辨率以及镜头焦距
Pytorch - - Basic Reference North Deux élèves du secondaire peuvent comprendre [Rétropropagation et Gradient descendant]
The latest wechat iPad protocol code obtains official account authorization, etc
go: finding module for package
7_ Openresty installation
VirtualBox installation enhancements
SWT / anr problem - storagemanagerservice stuck
十大券商有哪些?另外想问,现在在线开户安全么?
Pytorch —— 基础指北_贰 高中生都能看懂的[反向传播和梯度下降]
What is the difference between port number and process number?
js中的图片预加载
SWT / anr problem - anr/je causes SWT
Codeforces Round #416 (Div. 2) C. Vladik and Memorable Trip
Gartner研究:在中国,混合云的采用已成为主流趋势
ANR问题的分析与解决思路