单个div+css实现一个饼干效果代码
代码语言:html
所属分类:布局界面
代码描述:仅仅使用一个div+css代码实现一个饼干效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
body {
min-height: 325tive;
background-color: #639;
}
div {
position: absolute;
left: 50%;
top: 50%;
}
div:before,
div:after {
display: block;
content: '';
position: absolute;
}
@media (max-width: 400px) {
div {
transform: scale(0.8);
}
}
#nostalgia {
box-sizing: border-box;
font-size: 10px;
width: 35em;
height: 12em;
margin-left: -17.5em;
margin-top: -6em;
background-repeat: no-repeat;
background-image: linear-gradient(80deg, rgba(255,255,255,0.2) 20%, rgba(255,255,255,0) 40%), linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0.2), rgba(255,255,255,0.2), rgba(255,255,255,0)), linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0.2), rgba(255,.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0