当前位置:网站首页>天空云变化案例
天空云变化案例
2022-07-30 23:33:00 【qq_48639265】
运用css设置云朵从白天渐渐到晚上再到白天的变化
代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style> * {
padding: 0; margin: 0; } /* 设置背景样式 */ .bg {
height: 100vh; background-color: skyblue; animation: sky 10s linear infinite; } /* 设置云彩样式 */ .bg .cloud_one{
width: 300%; height: 100%; background: url('../images/cloud_one.png') repeat-x; position: fixed; top: 0; left:0; animation: cloud 20s linear infinite; } .bg .cloud_two{
width: 300%; height: 100%; background: url('../images/cloud_two.png') repeat-x; position: fixed; top: 0; left:0; animation: cloud 40s linear infinite; } .bg .cloud_three{
width: 300%; height: 100%; background: url('../images/cloud_three.png') repeat-x; position: fixed; top: 0; left:0; animation: cloud 60s linear infinite; } /* 设置天空轮播 */ @keyframes sky {
0% {
background-color: skyblue; } 50% {
background-color: #000; } 100% {
background-color: skyblue; } } /* 设置云彩轮播 */ @keyframes cloud {
from{
left: 0; } to{
left: -200%; } } </style>
</head>
<body>
<div class="bg">
<div class="cloud_one"></div>
<div class="cloud_two"></div>
<div class="cloud_three"></div>
</div>
</body>
</html>
效果图

边栏推荐
- Soft Exam Summary
- [MySQL] Mysql transaction and authority management
- Excel basic study notes
- 【LeetCode】70. 爬楼梯 - Go 语言题解
- "NIO Cup" 2022 Nioke Summer Multi-School Training Camp 2 H.Take the Elevator
- H5跳转微信公众号解决方案
- ZZULIOJ: 1120: the most value to exchange
- Apache Doris系列之:安装与部署详细步骤
- 详解操作符
- Achievements of Science and Technology (31)
猜你喜欢
随机推荐
(WebFlux)001、如何自定义注解实现功能
IJCAI2022教程 | 口语语言理解:最新进展和新领域
HF2022-EzPHP复现
实验8(vlan实验)
Achievements of Science and Technology (31)
雪佛兰开拓者,安全保障温暖你的家庭出行的第一选择
【LeetCode】42. 接雨水 - Go 语言题解
可视化工具Netron介绍
H5跳转微信公众号解决方案
【MySQL】DQL相关操作
Manually set transaction commit in mysql
oracle数据库版本问题咨询(就是对比从数据库查询出来的版本,和docker里面的oracle版本)?
360核心安全大脑3.0正式发布,构建政企用户的“能力中枢平台”
vscode上利用screen命令跑代码
Gxlcms audio novel system/novel listening system source code
matplotlib图表多曲线多纵轴绘制工具方法
“蔚来杯“2022牛客暑期多校训练营4 L.Black Hole 垃圾计算几何
leetcode 406. Queue Reconstruction by Height 根据身高重建队列(中等)
10 个关于自动化发布管理的好处
【LeetCode】70. 爬楼梯 - Go 语言题解









