查看: 589|回复: 0

小程序优惠券样式

[复制链接]

748

主题

39

回帖

3907

积分

管理员

总舵主

积分
3907
QQ
发表于 2024-5-25 20:06:43 | 显示全部楼层 |阅读模式
wxml代码:
  1. <!--pages/coupon/index.wxml-->
  2. <import src="../public/wxml/menu.wxml"/>

  3. <view class="blank"></view>
  4. <view class="coupon-list">
  5.     <view class="item stamp stamp01 ">
  6.         <!-- 左侧 -->
  7.         <view class="float-li t1">
  8.             <view class="coupon-left">
  9.                 <view class="t t1">¥</view>
  10.                 <view class="t t2">100</view>
  11.                 <view class="t t3">新人专享全场满199减30</view>
  12.                 <view class="t t4">优惠券编号:264669616164</view>
  13.             </view>
  14.         </view>
  15.         <!-- 右侧 -->
  16.         <view class="float-li-rig">
  17.             <view class="coupon-rig">
  18.                <view class="t1 t">优惠券</view>
  19.                <view class="t2 t">2018-01-17</view>
  20.                <view class="t2 t">2018-01-25</view>
  21.                <view class="t3 t"><text>立即领取</text></view>
  22.             </view>
  23.         </view>
  24.         <i></i>
  25.     </view>
  26.     <view class="item stamp stamp02 ">
  27.         <!-- 左侧 -->
  28.         <view class="float-li t1">
  29.             <view class="coupon-left">
  30.                 <view class="t t1">¥</view>
  31.                 <view class="t t2">100</view>
  32.                 <view class="t t3">新人专享全场满199减30</view>
  33.                 <view class="t t4">优惠券编号:264669616164</view>
  34.             </view>
  35.         </view>
  36.         <!-- 右侧 -->
  37.         <view class="float-li-rig">
  38.             <view class="coupon-rig">
  39.                <view class="t1 t">优惠券</view>
  40.                <view class="t2 t">2018-01-17</view>
  41.                <view class="t2 t">2018-01-25</view>
  42.                <view class="t3 t"><text>立即领取</text></view>
  43.             </view>
  44.         </view>
  45.         <i></i>
  46.     </view>
  47.     <view class="item stamp stamp03 ">
  48.         <!-- 左侧 -->
  49.         <view class="float-li t1">
  50.             <view class="coupon-left">
  51.                 <view class="t t1">¥</view>
  52.                 <view class="t t2">100</view>
  53.                 <view class="t t3">新人专享全场满199减30</view>
  54.                 <view class="t t4">优惠券编号:264669616164</view>
  55.             </view>
  56.         </view>
  57.         <!-- 右侧 -->
  58.         <view class="float-li-rig">
  59.             <view class="coupon-rig">
  60.                <view class="t1 t">优惠券</view>
  61.                <view class="t2 t">2018-01-17</view>
  62.                <view class="t2 t">2018-01-25</view>
  63.                <view class="t3 t"><text>立即领取</text></view>
  64.             </view>
  65.         </view>
  66.         <i></i>
  67.     </view>
  68.     <view class="item stamp stamp04 ">
  69.         <!-- 左侧 -->
  70.         <view class="float-li t1">
  71.             <view class="coupon-left">
  72.                 <view class="t t1">¥</view>
  73.                 <view class="t t2">100</view>
  74.                 <view class="t t3">新人专享全场满199减30</view>
  75.                 <view class="t t4">优惠券编号:264669616164</view>
  76.             </view>
  77.         </view>
  78.         <!-- 右侧 -->
  79.         <view class="float-li-rig">
  80.             <view class="coupon-rig">
  81.                <view class="t1 t">优惠券</view>
  82.                <view class="t2 t">2018-01-17</view>
  83.                <view class="t2 t">2018-01-25</view>
  84.                <view class="t3 t"><text>立即领取</text></view>
  85.             </view>
  86.         </view>
  87.         <i></i>
  88.     </view>
  89.     <view class="item stamp stamp05 ">
  90.         <!-- 左侧 -->
  91.         <view class="float-li t1">
  92.             <view class="coupon-left">
  93.                 <view class="t t1">¥</view>
  94.                 <view class="t t2">100</view>
  95.                 <view class="t t3">新人专享全场满199减30</view>
  96.                 <view class="t t4">优惠券编号:264669616164</view>
  97.             </view>
  98.         </view>
  99.         <!-- 右侧 -->
  100.         <view class="float-li-rig">
  101.             <view class="coupon-rig">
  102.                <view class="t1 t">优惠券</view>
  103.                <view class="t2 t">2018-01-17</view>
  104.                <view class="t2 t">2018-01-25</view>
  105.                <view class="t3 t"><text>立即领取</text></view>
  106.             </view>
  107.         </view>
  108.         <i></i>
  109.     </view>
  110. </view>
  111. <view class="blank"></view>
  112. <view class="box note">
  113.     <view>优惠券使用方式:</view>
  114.     <view>1、领取优惠券</view>
  115.     <view>2、将购买的宝贝加入购物车</view>
  116.     <view>3、点击结算时勾选使用优惠券</view>
  117.     <view>4、提交订单、付款,订单完成</view>
  118. </view>

  119. <!-- 浮窗 底部-->
  120. <template is="menu-footer" data="{{nav: footNav}}"/>
复制代码

wxcss样式代码:
  1. .coupon-list{width: 710rpx; margin:  0 auto}
  2. .coupon-list .item{width: 710rpx; height: 250rpx; margin-bottom: 20rpx;}
  3. .coupon-list .item .float-li{width: 450rpx; height: 100%; border-right: 2rpx dashed rgba(255,255,255,.3)}
  4. .coupon-list .item .float-li-rig{width: 220rpx; padding-right: 20rpx; height:100%; color: #fff}


  5. .coupon-left{position: relative}
  6. .coupon-left .t{position: absolute; color: #fff}
  7. .coupon-left .t1{left: 10rpx; top: 110rpx}
  8. .coupon-left .t2{left: 30rpx; top: 50rpx; font-size: 80rpx; font-weight: bold }
  9. .coupon-left .t3{left: 220rpx; top: 50rpx; width: 200rpx; font-size: 30rpx;}
  10. .coupon-left .t4{left: 10rpx; top:180rpx}

  11. .coupon-rig .t{text-align: center}
  12. .coupon-rig .t1{font-size: 40rpx; padding: 30rpx 0 10rpx 0;}
  13. .coupon-rig .t3{padding-top:20rpx}
  14. .coupon-rig .t3 text{background: #fff; color: #333; border-radius: 7rpx; padding: 10rpx 40rpx}


  15. .note{background: #faeab7}


  16. .stamp{width:700rpx; height: 250rpx;margin-bottom:50rpx;position:relative;overflow:hidden}
  17. .stamp i{position: absolute;left: 20%;top: 90rpx;height: 500rpx;width: 700rpx;background-color: rgba(255,255,255,.15);transform: rotate(-30deg);
  18. }
  19. .stamp01{background:radial-gradient(rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 30rpx, #F39B00 30rpx);background-size:10rpx 10rpx;background-position:9rpx 3rpx; background: #F39B00}
  20. .stamp02{background:radial-gradient(rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 30rpx, #D24161 30rpx);background-size:10rpx 10rpx;background-position:9rpx 3rpx; background: #D24161}
  21. .stamp03{background:radial-gradient(rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 30rpx, #D24161 30rpx);background-size:10rpx 10rpx;background-position:9rpx 3rpx; background: #7EAB1E }
  22. .stamp04{background:radial-gradient(rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 30rpx, #D24161 30rpx);background-size:10rpx 10rpx;background-position:9rpx 3rpx; background: #50ADD3 }
  23. .stamp05{background:radial-gradient(rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 30rpx, #D24161 30rpx);background-size:10rpx 10rpx;background-position:9rpx 3rpx; background: #f0229b}
  24. .stamp05{background:radial-gradient(rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 30rpx, #D24161 30rpx);background-size:10rpx 10rpx;background-position:9rpx 3rpx; background: #f0229b}
复制代码
失效样式代码:
  1. .stamp06{background:radial-gradient(rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 30rpx, #e2e2e2 30rpx);background-size:10rpx 10rpx;background-position:9rpx 3rpx; background: #acacac
  2. }
复制代码


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
道不同,不相为谋!理想要有,万一实现了呢?
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关注公众号

相关侵权、举报、投诉及建议等,请发 E-mail:2513533699@qq.com

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.|鲁ICP备19000917号|鲁公网安备37078302000320号

在本版发帖
关注公众号
QQ客服返回顶部