随机字符背景效果
代码语言:html
所属分类:背景
代码描述:随机字符背景效果
代码标签: 效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
@font-face {
font-family: 'Muli';
font-weight: 200 900;
src: url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/240751/Muli-VariableFont_wght.ttf") format("truetype");
}
@font-face {
font-family: 'Playfair Display';
font-weight: 400 900;
src: url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/240751/PlayfairDisplay-Italic-VariableFont_wght.ttf") format("truetype");
}
*, *:before, *:after {
box-sizing: border-box;
}
.sr, #app .toolbar input[type="checkbox"] {
position: absolute;
left: -100vw;
width: 1px;
height: 1px;
opacity: 0;
clip: rect(1px, 1px, 1px, 1px);
}
.float-right {
float: right;
margin-left: auto;
}
body {
margin: 0;
height: 100vh;
width: 100vw;
overflow: hidden;
}
#app {
font-family: 'Muli';
color: #53565a;
min-height: 100vh;
}
#app #grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
grid-auto-flow: dense;
min-height: 100vh;
-webkit-box-align: stretch;
align-items: stretch;
}
#app .cell {
width: 100%;
line-height: 1em;
display: -webkit-box;
display: flex;
-webkit-box-align: center;
align-items: center;
-webkit-box-pack: center;
justify-content: center;
font-size: calc(.7em + 3vmin);
-webkit-transition: background 0.6s cubic-bezier(0.5, 0, 0.5, 1), font-weight 0.6s cubic-bezier(0.5, 0, 0.5, 1), color 0.6s cubic-bezier(0.5, 0, 0.5, 1);
transi.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0