纯css绘制光剑效果
代码语言:html
所属分类:布局界面
代码描述:纯css绘制光剑效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
*,
*:before,
*:after {
position: relative;
box-sizing: border-box;
}
:root {
--lightsaber-color: #6eedb2;
}
html,
body {
height: 100%;
width: 100%;
margin: 0;
padding: 0;
overflow: hidden;
}
body {
display: -webkit-box;
display: flex;
-webkit-box-pack: center;
justify-content: center;
-webkit-box-align: center;
align-items: center;
background: #0f101e;
}
.lightsaber {
-webkit-transition: -webkit-transform 0.3s ease-in-out;
transition: -webkit-transform 0.3s ease-in-out;
transition: transform 0.3s ease-in-out;
transition: transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;
width: 30vw;
height: 5vw;
display: -webkit-box;
display: flex;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
flex-direction: row;
-webkit-box-align: center;
align-items: center;
}
.metal {
background: -webkit-gradient(linear, left top, left bottom, color-stop(10%, #ccdbee), color-stop(35%, #607088), color-stop(70%, #ccdbee), to(#607088));
background: linear-gradient(to bottom, #ccdbee 10%, #607088 35%, #ccdbee 70%, #607088);
}
.black-metal {
background: -webkit-gradient(linear, left top, left bottom, color-stop(10%, #.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0