css布局实现三维探照灯灯塔旋转动画效果代码
代码语言:html
所属分类:动画
代码描述:css布局实现三维探照灯灯塔旋转动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<title></title>
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<style>
*, *:before, *:after {
border: 0;
box-sizing: border-box;
margin: 0;
padding: 0;
}
:root {
font-size: 16px;
}
body {
background: #126;
display: flex;
height: 100vh;
overflow-x: hidden;
}
.lighthouse {
margin: auto;
position: relative;
width: 16.4em;
height: 31.2em;
perspective: 30em;
}
.lighthouse div {
position: absolute;
}
.shadow {
background: rgba(0, 0, 10, 0.15);
width: 20%;
height: 100%;
z-index: 1;
}
.light-ray {
animation: lightRay 3s 0s cubic-bezier(0.8, 0.2, 0.2, 0.8) infinite running;
background: linear-gradient(90deg, #ffff5c, rgba(255, 255, 92, 0));
top: 3.3em;
left: 8em;
width: 14em;
height: 1.5em;
transform-origin: 0% 50%;
z-index: 6;
}
.roof-tip {
background: #464646;
border-radius: 50%;
left: 7.5em;
width: 1em;
height: 1em;
z-index: 1;
}
.roof {
backgro.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0