css+div实现圣诞彩灯挂在绳子上开关效果代码
代码语言:html
所属分类:布局界面
代码描述:css+div实现圣诞彩灯挂在绳子上开关效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
body {
margin: 0;
background:#000;
}
.lamp {
height: 20px;
width: 20px;
background: red;
border-radius: 20px 0 20px;
transform-origin: 100% 0%;
animation-name: swing;
animation-duration:500ms;
animation-direction: alternate;
animation-iteration-count: infinite;
animation-timing-function: ease-in-out;
float: left;
}
@keyframes swing {
0% {
transform: rotate(-40deg);
}
100% {
transform: rotate(-50deg);
}
}
.switch {
position: fixed;
bottom: 0px;
left: 50%;
height: 80px;
width: 80px;
cursor: pointer;
.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0