<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>HTML5 CSS3 蓝色斋月灯笼动画</title>
<style>
* {
padding: 0;
margin: 0;
outline: none;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
body {
background: #1f1542;
}
#work {
width: 300px;
margin: 0 auto;
position: relative;
top: -20px;
-webkit-animation-name: routate;
-webkit-animation-duration: 4s;
-webkit-animation-iteration-count: infinite;
animation-name: routate;
animation-duration: 5s;
animation-iteration-count: infinite;
}
@-webkit-keyframes routate {
0% {
-webkit-transform: rotate(7deg);
-ms-transform: rotate(7deg);
transform: rotate(7deg);
}
50% {
-webkit-transform: rotate(-7deg);
-ms-transform: rotate(-7deg);
transform: rotate(-7deg);
}
100% {
-webkit-transform: rotate(7deg);
-ms-transform: rotate(7deg);
transform: rotate(7deg);
}
}
@keyframes routate {
0% {
-webkit-transform: rotate(7deg);
-ms-transform: rotate(7deg);
transform: rotate(7deg);
}
50% {
-webkit-transform: rotate(-7deg);
-ms-transform: rotate(-7deg);
transform: rotate(-7deg);
}
100% {
-webkit-transform: rotate(7deg);
-ms-transform: rotate(7deg);
transform: rotate(7deg);
}
}
#work #wire {
margin: 0 auto;
height: 130px;
width: 10px;
background: #261647;
border: 5px #0c032e solid;
}
#work #c1 {
position: absolute;
z-index: 5;
bottom: 0;
height: 300px;
}
#work .light {
width: 100%;
height: 100%;
padding: 30px;
margin: 0 auto;
background: rgba(255, 155, 0, 0.08);
-webkit-border-radius: 100%;
-moz-border-radius: 100%;
border-radius: 100%;
-webkit-animation-name: flash;
-webkit-animation-duration: 4s;
-webkit-animation-iteration-count: infinite;
animation-name: flash;
animation-duration: 1s;
animation-iteration-count: infinite;
}
@-webkit-keyframes flash {
0% {
background: rgba(255, 155, 0, 0.08);
}
50% {
background: rgba(255, 155, 0, 0.04);
}
100% {
background: rgba(255, 155, 0, 0.08);
}
}
@keyframes flash {
0% {
background: rgba(255, 155, 0, 0.08);
}
50% {
background: rgba(255, 155, 0, 0.04);
}
100% {
background: rgba(255, 155, 0, 0.08);
}
}
#fanos {
height: 380px;
padding: 10px;
margin: 0 auto;
position: relative;
top: -20px;
}
#small-circle {
margin: 0 auto;
width: 30px;
height: 30px;
-webkit-border-radius: 100%;
-moz-border-radius: 100%;
border-radius: 100%;
background: #261647;
border: 5px #0c032e solid;
position: relative;
z-index: 5;
}
#half-circle {
width: 120px;
height: 120px;
position: absolute;
top: 25px;
left: 50%;
-webkit-transform: translateX(-50%);
-ms-transform: translateX(-50%);
transform: translateX(-50%);
z-index: 1;
-webkit-border-radius: 100%;
-moz-border-radius: 100%;
border-radius: 100%;
background: #40315a;
border: 5px #0c032e solid;
}
#bottom-quppa {
margin: 0 auto;
position: relative;
top: 50px;
z-index: 3;
}
#line {
margin: 0 auto;
width: 200px;
height: 30px;
padding-top: 3px;
background: #261647;
border: 5px #0c032e solid;
overflow: hidden;
text-align: center;
}
#line .ball {
width: 15px;
height: 15px;
margin: auto 5px;
display: inline-block;
-webkit-border-radius: 100%;
-moz-border-radius: 100%;
border-radius: 100%;
background: #40315a;
border: 5px #0c032e solid;
}
#top-triangle {
margin: 0 auto;
width: 210px;
height: 0;
border-left: 25px transparent solid;
border-right: 25px transparent solid;
border-bottom: 30px #0c032e solid;
position: relative;
top: -5px;
}
#top-triangle:after {
content: '';
display: block;
position: absolute;
z-index: 3;
left: 50%;
-webkit-transform: translateX(-50%);
-ms-transform: translateX(-50%);
transform: translateX(-50%);
top: 5px;
width: 155px;
height: 0;
border-left: 15px transparent solid;
border-right: 15px transparent solid;
border-bottom: 20px #40315a solid;
}
#box {
width: 170px;
margin: 0 auto;
height: 180px;
background: rgba(255, 255, 255, 0.1);
position: relative;
top: -10px;
z-index: 1;
border: 5px #0c032e solid;
}
#box #candel {
height: 60px;
width: 30px;
background: #ffffff;
border: 5px #0c032e solid;
border-bottom: 0;
position: absolute;
z-index: 1;
left: 65px;
bottom: 0;
}
#box #candel:after {
content: '';
display: block;
margin: 0 auto;
position: relative;
top: -20px;
width: 10px;
height: 15px;
-webkit-border-radius: 100%;
-moz-border-radius: 100%;
border-radius: 100%;
background: #ff9b00;
border: 5px #0c032e solid;
}
#box #col {
margin: 0 auto;
width: 90px;
height: 170px;
border-left: 5px #0c032e solid;
border-right: 5px #0c032e solid;
position: relative;
z-index: 2;
background: rgba(255, 255, 255, 0.1);
}
#final {
position: relative;
z-index: 4;
top: -15px;
}
#last-triangle {
margin: 0 auto;
width: 245px;
height: 0;
border-left: 25px transparent solid;
border-right: 25px transparent solid;
border-bottom: 25px #0c032e solid;
position: relative;
top: -5px;
}
#last-triangle:after {
content: '';
display: block;
position: absolute;
z-index: 3;
left: 50%;
-webkit-transform: translateX(-50%);
-ms-transform: translateX(-50%);
transform: translateX(-50%);
top: 5px;
width: 190px;
height: 0;
border-left: 15px transparent solid;
border-right: 15px transparent solid;
border-bottom: 15px #40315a solid;
}
</style>
</head>
<body>
<div id="work">
<div id="wire"></div>
<div id="fanos">
<div id="small-circle"></div>
<div id="half-circle"></div>
<div id="bottom-quppa">
<div id="line">
<span class="ball"></span>
<span class="ball"></span>
<span class="ball"></span>
<span class="ball"></span>
<span class="ball"></span>
<span class="ball"></span>
<span class="ball"></span>
</div>
<div id="top-triangle"></div>
<div id="box">
<div id="candel"></div>
<div id="col"></div>
</div>
<div id="final">
<div id="line"></div>
<div id="last-triangle"></div>
</div>
</div>
</div>
<div class="light" id="c1">
<div class="light">
<div class="light">
<div class="light">
</div>
</div>
</div>
</div>
</div>
</body>
</html>
HTML5+CSS3实现摇晃的蓝色斋月灯笼动画效果源码.zip
版权申诉
189 浏览量
2022-11-03
23:42:09
上传
评论
收藏 2KB ZIP 举报
易小侠
- 粉丝: 6468
- 资源: 9万+
最新资源
- 冯璐阳 42105650—祝福.docx
- 基于多种算法及改进算法实现的移动机器人路径规划matlab源码(含A星算法+PRM+RRT的改进等).zip
- 布里斯托尔纸细分市场、总体规模、先进性、市占率行业分析报告2024年.docx
- Obi绳子插件,好用的很 6.5.4版本
- openjfx-22.0.1-windows-x64-bin-sdk.zip
- 基于ros和stm32f1的小车代码(含串口通信)+项目说明.zip
- 人体姿态估计-基于Tensorflow实现的人体姿态估计算法-附项目源码-优质项目分享.zip
- java实现所有算法大全
- JDBC DAO模式 (复习)
- Proteus仿真AT89C51电子密码锁
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈