HLJ 发布于
2024-04-22 22:26:29

css3文字渐变打印显示动画

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title></title>
<style>
.bio {

    -webkit-mask-image: linear-gradient(to right, rgb(0, 0, 0) 45.4545454545%, rgba(0, 0, 0, 0) 54.5454545455%);
    -webkit-mask-size: 220% 100%;
    -webkit-mask-repeat: no-repeat;
    animation-name: bio-fade;
    animation-duration: 2s;
    animation-timing-function: ease-in-out;
    animation-delay: .3s;
    animation-fill-mode: both;
}

@keyframes bio-fade {
    0% {
        -webkit-mask-position: 100% 0
    }

    to {
        -webkit-mask-position: 0% 0
    }
}
</style>
</head>
<body>
 
<div class="bio">
小薇呀你可知道我多爱你
我要带你飞到天上去
看那星星多么美丽
摘下一颗亲手送给你
</div>
 
</body>
</html>
当前文章内容为原创转载请注明出处:http://www.good1230.com/detail/2024-04-22/634.html
最后生成于 2024-04-22 22:29:27
此内容有帮助 ?
0