单个div+css布局实现鱼子酱面包效果代码
代码语言:html
所属分类:布局界面
代码描述:仅使用一个div结合css代码实现上面铺满鱼子酱的面包效果代码。
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
body {
min-height: 250px;
height: 100vh;
position: relative;
background-color: #ff6347;
font-size: 10px;
}
div {
box-sizing: border-box;
position: absolute;
left: 50%;
top: 50%;
}
div:before,
div:after {
box-sizing: border-box;
display: block;
content: '';
position: absolute;
}
@media (max-width: 400px) {
div {
transform: scale(0.8);
}
}
#fancy {
box-sizing: border-box;
width: 20em;
height: 8em;
margin-left: -10em;
margin-top: -5em;
background-color: #cd853f;
background-repeat: no-repeat;
background-image: radial-gradient(ellipse, rgba(255,255,255,0.2) 60%, rgba(255,255,255,0) 62%), radial-gradient(ellipse, rgba(255,255,255,0.2) 60%, rgba(255,255,255,0) 62%), radial-gradient(ellipse, rgba(255,255,255,0.2) 60%, rgba(255,255,255,0) 62%), radial-g.........完整代码请登录后点击上方下载按钮下载查看
网友评论0