内圆角的实现样式--类似优惠券

以上是设计图。

以下是对应的css.

.box-contain{

width: 650px;

height: 1009px;

color: #FFF;

font-size: 24px;

text-align: center;

line-height: 60px;

background-color: #FFF;

position: relative;

z-index: 100;

margin: auto;

z-index: 100;

border-radius: 20px;

}

.box-contain::after{

width: 40px;

height: 40px;

content: "";

right: -20px;

top: 629px;

position: absolute;

display: block;

background: #F3F3F3;

border-radius: 40px;

}

.box-contain::before{

width: 40px;

height: 40px;

content: "";

left: -20px;

top: 629px;

position: absolute;

display: block;

background: #F3F3F3;

border-radius: 40px;

}

虚线样式:

.bottom-box{

width:650px;

height:379px;

background: #fff;

position: relative;

border-radius: 0 0 8px 8px;

margin: 40px auto;

padding: 40px;

text-align: left;

.gift {

font-size: 24px;

color: #141313;

font-weight: bold;

line-height: 33px;

overflow: hidden;

text-overflow: ellipsis;

display: -webkit-box;

-webkit-line-clamp: 2;

-webkit-box-orient: vertical;

span {

color: #FF3B50;

}

}

.desc {

margin: 20px auto;

font-size: 26px;

color: #666666;

line-height: 37px;

overflow: hidden;

text-overflow: ellipsis;

display: -webkit-box;

-webkit-line-clamp: 3;

-webkit-box-orient: vertical;

}

.time-label {

margin: 10px auto;

font-size: 26px;

color: #666666;

line-height: 37px;

}

.time {

margin: 10px auto;

font-size: 26px;

color: #666666;

line-height: 37px;

}

}

.top-box p,.bottom-box p{

width: calc(650px - 40px);

height:20px;

position:absolute;

left: 20px;

}

.top-box p{

background: #fff;

bottom: -20px;

border-bottom: 4px dashed #E1E1E1;

}

.bottom-box p{

background: #fff;

top: -20px;

}

.top-box p::before,.bottom-box p::before{

content:'';

position:absolute;

width: 20px;

height: 20px;

left:-20px;

}

.top-box p::after,.bottom-box p::after{

content:'';

position:absolute;

width: 20px;

height: 20px;

right:-20px;

// background: #FFF;

border-radius: 100%;

}

页面代码:

<div class="box-contain">

<div class="top-box">

</div>

 </div>

<p></p>

<div class="bottom-box">

<p></p>

</div>

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值