更新第53个小实例
This commit is contained in:
parent
461bc8f0e2
commit
d049019233
|
@ -56,4 +56,5 @@
|
|||
49. HTML5+CSS3小实例之3D分层图像悬停效果
|
||||
50. HTML5+CSS3小实例之不偷看密码的超萌猫头鹰登录界面
|
||||
51. HTML5+CSS3小实例之动感的金属质感闪光文字
|
||||
52. HTML5+CSS3小实例之高级感满满的滚轮视差响应效果
|
||||
52. HTML5+CSS3小实例之高级感满满的滚轮视差响应效果
|
||||
53. HTML5+CSS3小实例之有趣的幽灵文字特效
|
|
@ -0,0 +1,67 @@
|
|||
*{
|
||||
/* 初始化 */
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.container{
|
||||
/* 100%窗口高度 */
|
||||
height: 100vh;
|
||||
/* 弹性布局 居中 */
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
/* 溢出隐藏 */
|
||||
overflow: hidden;
|
||||
background-color: #000;
|
||||
}
|
||||
h2{
|
||||
display: flex;
|
||||
font-size: 160px;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
/* 转大写 */
|
||||
text-transform: uppercase;
|
||||
}
|
||||
h2 span{
|
||||
/* 动画过渡 */
|
||||
transition: 1.5s;
|
||||
}
|
||||
h2:hover span{
|
||||
/* 模糊 */
|
||||
filter: blur(20px);
|
||||
/* 不透明度 */
|
||||
opacity: 0;
|
||||
/* 放大 */
|
||||
transform: scale(2);
|
||||
}
|
||||
/* 接下来分别为每一个span元素设置动画延迟时间 */
|
||||
h2 span:nth-child(1){
|
||||
transition-delay: 0.1s;
|
||||
}
|
||||
h2 span:nth-child(2){
|
||||
transition-delay: 0.2s;
|
||||
}
|
||||
h2 span:nth-child(3){
|
||||
transition-delay: 0.3s;
|
||||
}
|
||||
h2 span:nth-child(4){
|
||||
transition-delay: 0.4s;
|
||||
}
|
||||
h2 span:nth-child(5){
|
||||
transition-delay: 0.5s;
|
||||
}
|
||||
h2 span:nth-child(6){
|
||||
transition-delay: 0.6s;
|
||||
}
|
||||
h2 span:nth-child(7){
|
||||
transition-delay: 0.7s;
|
||||
}
|
||||
h2 span:nth-child(8){
|
||||
transition-delay: 0.8s;
|
||||
}
|
||||
h2 span:nth-child(9){
|
||||
transition-delay: 0.9s;
|
||||
}
|
||||
h2 span:nth-child(10){
|
||||
transition-delay: 1s;
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
|
||||
|
||||
<title>有趣的幽灵文字特效</title>
|
||||
<link rel="stylesheet" href="../css/53.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<h2>
|
||||
<span>h</span>
|
||||
<span>e</span>
|
||||
<span>l</span>
|
||||
<span>l</span>
|
||||
<span>o</span>
|
||||
<span>w</span>
|
||||
<span>o</span>
|
||||
<span>r</span>
|
||||
<span>l</span>
|
||||
<span>d</span>
|
||||
</h2>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
Loading…
Reference in New Issue