<div class="total-container">
<div class="box-wrapper">
<p style="margin: 10px 0; font-weight: bold; color: #e25252;">background-size: 60% 100%;</p>
<div class="color-box"></div>
<div class="color-box"></div>
</div>
</div>
HTML
格式化
支持Emmet,输入 p 后按 Tab键试试吧!
<head> ... </head>
<body>
</body>
.total-container {
width: 360px;
margin: 20px;
}
.box-wrapper {
border: 2px dotted #000;
padding: 5px;
}
.color-box {
height: 200px;
background: radial-gradient(circle 30px at left center, transparent 100%, #071583 100%),
radial-gradient(circle 30px at right center, transparent 100%, #071583 100%);
}
.color-box:nth-of-type(1) {
margin-bottom: 20px;
background: radial-gradient(circle 30px at right center, transparent 100%, #071583 100%);
background-size: 60% 100%;
background-position: right center;
background-repeat: no-repeat;
}
.color-box:nth-of-type(2) {
background: radial-gradient(circle 30px at left center, transparent 100%, #071583 100%);
background-size: 60% 100%;
background-position: left center;
background-repeat: no-repeat;
}
/* .color-box {
height: 300px;
background-image: linear-gradient(to top, rgb(0, 0, 0), rgba(0, 0, 0, 0)),
linear-gradient(to right, rgb(255, 255, 255), rgba(255, 255, 255, 0));
background-color: rgb(221, 62, 66);
/* background: radial-gradient(circle 60px at left center, #FCA760 50%, #FF7B84 50%, #071583 100%); */
} */