赞
踩
使用了 CSS 的一些属性:
:after
伪类
position
定位
border-radius
圆角边框
linear-gradient
背景颜色渐变
display: flex;
flex
布局
box-shadow
盒子阴影
<div class="card-wrap">
<div class="card-box">
<div class="card-info">content</div>
</div>
</div>
.card-wrap { width: 100%; height: 188px; position: relative; z-index: -1; overflow: hidden; } .card-wrap:after { width: 140%; height: 168px; position: absolute; left: -20%; top: 0; z-index: -1; content: ''; border-radius: 0 0 50% 50%; background: linear-gradient(144deg, #3c9cef 0%, #5f6bfd 100%); } .card-box { position: absolute; bottom: 10px; width: 100%; .card-info { margin: auto; width: 92%; height: 92px; display: flex; align-items: center; justify-content: center; background: #ffffff; box-shadow: 0 4px 8px 0 rgba(190, 195, 199, 0.5); border-radius: 8px; } }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。