当前位置:网站首页>天空云变化案例
天空云变化案例
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>
效果图

边栏推荐
- “由于找不到MSVCP140.dll,无法继续执行代码,重新安装程序可能会解决此问题等”解决方案
- Gxlcms audio novel system/novel listening system source code
- The difference between ?? and ??= and ?. and || in JS
- leetcode(刷题篇13)
- 抽象类和接口(学习笔记)
- CPM:A large-scale generative chinese pre-trained lanuage model
- “蔚来杯“2022牛客暑期多校训练营2 H.Take the Elevator
- 2022 China Logistics Industry Conference and Entrepreneur Summit Forum will be held in Hangzhou!
- EasyExcel comprehensive course combat
- 边缘计算与小程序也能结合!智能家居是否能借势上台阶
猜你喜欢
随机推荐
HCIP第十五天笔记
动态修改el-tab-pane 的label(整理)
Go语学习笔记 - gorm使用 - 表增删改查 Web框架Gin(八)
MySQL连接时出现2003错误
vscode上利用screen命令跑代码
Go语学习笔记 - gorm使用 - 事务操作 Web框架Gin(十一)
软考总结
ZZULIOJ: 1120: the most value to exchange
阿里云视频点播+项目实战
第一节 zadig 入门
【MySQL】DQL相关操作
DFS question list and template summary
Alibaba Cloud video on demand + project combat
PS基础学习(一)
PyTorch模型导出到ONNX文件示例(LeNet-5)
数据清洗-使用es的ingest
状态机动态规划之股票问题总结
win10重建索引
flex-direction容器属性
反转链表-就地逆置法









