css布局实现风扇效果
代码语言:html
所属分类:布局界面
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://fonts.googleapis.com/css?family=Dancing+Script|Lato&display=swap" rel="stylesheet">
<style>
@charset "UTF-8";body,html {
box-sizing: border-box
}
body {
display: -webkit-box;
display: flex;
display: -ms-flex;
-webkit-box-flex: 1;
flex: 1 0 auto;
-webkit-box-pack: center;
justify-content: center;
-webkit-box-align: center;
align-items: center;
height: 100vh;
background: radial-gradient(#111,#000)
}
.frame {
z-index: 10;
width: 225px;
height: 520px;
background: -webkit-gradient(linear,left bottom, left top,color-stop(20%, rgba(85,85,85,.6)),color-stop(30%, rgba(136,136,136,.6)),color-stop(40%, rgba(102,102,102,.6)),color-stop(47%, rgba(102,102,102,.6)),color-stop(80%, rgba(170,170,170,.6)),to(rgba(51,51,51,.8))),url(https://image.freepik.com/free-vector/abstract-colorful-pattern-shape-design-background_38782-954.jpg) 50%;
background: linear-gradient(totop,rgba(85,85,85,.6) 20%,rgba(136,136,136,.6) 30%,rgba(102,102,102,.6) 40%,rgba(102,102,102,.6) 47%,rgba(170,170,170,.6) 80%,rgba(51,51,51,.8)),url(https://image.freepik.com/free-vector/abstract-colorful-pattern-shape-design-background_38782-954.jpg) 50%;
-webkit-filter: contrast(1.1);
filter: contrast(1.1);
border-radius: 4px;
display: -webkit-box;
display: flex;
-webkit-box-pack: center;
justify-content: center;
-webkit-box-align: center;
align-items: center;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
flex-direction: column;
position: relative;
box-shadow: inset 0 0 4px;
z-index: -1;
-webkit-user-select: none!important;
-moz-user-select: none!important;
-ms-user-select: none!important;
user-select: none!important
}
.frame::before {
position: absolute;
content: '';
height: 58%;
width: 100%;
right: 0;
top: 50%;
-webkit-transform: translateY(-50%);
transform: translateY(-50%);
border-radius: 40px;
background: linear-gradient(75deg,rgba(51,51,51,.7),rgba(17,17,17,.7)),rgba(51,51,51,.8);
box-shadow: 0 5px 0 rgba(255,255,255,.2),0 -5px 0 rgba(255,255,255,.2),inset 0 0 5px rgba(0,0,0,.5)
}
.frame::after {
position: absolute;
content: 'Re-designed and Code by AMAN. RTX SPECIAL EDITION';
font: 6px Lato;
right: -1px;
z-index: -1;
bottom: 52%;
-webkit-t.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0