微信小程序——前端——抵扣券、优惠券样式

微信小程序——前端——抵扣券、优惠券样式

效果图:

在这里插入图片描述

实现思路:

左边+划线+右边==使用信息+分割线+使用限制

整体底色:
.wrapper {
  margin: 0 auto;
  width: 100%;
  display: flex;
  background:linear-gradient(-90deg,rgba(250,173,82,1),rgba(254,50,103,1));
  /*实现颜色渐变 */
}
/*几个伪类化成的圆弧的样式以及位置(置于顶部)*/
.content:before, .tip:before, .split-line:before{
  border-radius: 0 0 16rpx 16rpx;
  top: 0;
}
.content:after, .tip:after, .split-line:after{
  border-radius: 16rpx 16rpx 0 0;
  bottom: 0;
}
左边:
/*前半部分样式*/
.content {
  position: relative;
  flex: 1;
  padding: 20rpx;
  text-align: left;
  white-space: nowrap;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}
/*给前半部分加两个伪类,基本样式如下*/
.content:before, .content:after{
  content: '';
  position: absolute;
  width: 32rpx;
  height: 16rpx;
  background: #eee;
  left: -16rpx;
  z-index: 1;
}
.tip:before, .tip:after{
  content: '';
  position: absolute;
  width: 32rpx;
  height: 16rpx;
  background:#eee;
  right: -16rpx;
  z-index: 1;
}
分割线:
/*中间竖直虚线样式*/
.split-line {
  position: relative;
  flex: 0 0 0;
  margin: 0 10rpx 0 6rpx;
  border-left: 4rpx dashed #eee;   
}
/*给虚线加两个伪类,基本样式如下*/
.split-line:before, .split-line:after {
  content: '';
  position: absolute;
  width: 32rpx;
  height: 16rpx;
  background: #eee;
  left: -18rpx;
  z-index: 1;
}
右边:
/*后半部分样式*/
.tip {
  position
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值