200字范文,内容丰富有趣,生活中的好帮手!
200字范文 > css3动画(animation)效果1-漂浮的白云

css3动画(animation)效果1-漂浮的白云

时间:2023-09-10 06:20:31

相关推荐

css3动画(animation)效果1-漂浮的白云

<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>漂浮的白云</title><style type="text/css">.box {position: relative;height: 300px;width: 500px;}.in1, .in2 {position: absolute;height: 100%;width: 100%;background-size: cover;animation: move 100s infinite linear alternate;}@keyframes move {100% {background-position: 500% 0;}}.in1 {background-image: url('/uploads/rs/26/ddzmgynp/cloud.png');}.in2 {background-image: url('/uploads/rs/26/ddzmgynp/cloud1.png');animation-duration: 10s;}</style></head><body><h1>漂浮的白云</h1><div class="box"><div class="in1"></div><div class="in2"></div></div><strong>【简要介绍】</strong><p>漂浮的白云主要通过远景白云和近景白云来实现立体漂浮效果。远景和近景分别使用两张背景图片,通过改变其背景定位来实现白云移动效果,通过设置不同的动画持续时间来实现交错漂浮的效果</p></body></html>

效果图:

原链接:/xiaohuochai/p/5419236.html

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。