当前位置:   article > 正文

css 优惠券样式大全_css优惠券样式

css优惠券样式

优惠券一

  1. // 优惠券一
  2. <div class="card">
  3. <div class="card-left">350书券</div>
  4. <div class="card-right">
  5. <p class="card-info">满30元送350书券</p>
  6. <strong class="card-time">仅剩 04:48:49</strong>
  7. </div>
  8. </div>
  9. <style>
  10. .card{
  11. display: flex;
  12. align-items: center;
  13. width: 16%;
  14. padding: 10px 0;
  15. background: #fff;
  16. border-radius: 8px;
  17. -webkit-mask-image: radial-gradient(circle at 88px 4px, transparent 4px, red 4.5px),radial-gradient(closest-side circle at 50%, red 99%, transparent 100%);
  18. -webkit-mask-size: 100%, 2px 4px;
  19. -webkit-mask-repeat: repeat, repeat-y;
  20. -webkit-mask-position: 0 -4px, 87px;
  21. -webkit-mask-composite: source-out;
  22. mask-composite: subtract;
  23. background: linear-gradient(45deg, orange, red);
  24. }
  25. .card-left{
  26. width: 88px;
  27. text-align: center;
  28. font-size: 18px;
  29. color: #fff;
  30. }
  31. .card-right{
  32. padding: 16px 12px;
  33. display: flex;
  34. flex: 1;
  35. flex-direction: column;
  36. }
  37. .card-info{
  38. margin: 0;
  39. font-size: 14px;
  40. line-height: 20px;
  41. color:#fff;
  42. }
  43. .card-time{
  44. font-size: 12px;
  45. line-height: 16px;
  46. font-weight: normal;
  47. color: #fff;
  48. margin-top: 4px;
  49. }
  50. </style>

优惠券二

  1. // 优惠券二
  2. <div class="item">
  3. <div class="box">
  4. <div class="content">
  5. <div class="page-group">
  6. <i class="fold-page"></i>
  7. <span class="page">折扣券</span>
  8. </div>
  9. <i class="dot-left"></i>
  10. <i class="dot-right"></i>
  11. </div>
  12. <div class="footer">
  13. <div class="footer-label">使用说明</div>
  14. <div>请在指定门店兑换</div>
  15. </div>
  16. <div class="ribbon">已失效</div>
  17. </div>
  18. </div>
  19. <style>
  20. .item {
  21. width: 349px;
  22. overflow: hidden;
  23. margin-bottom: 10px;
  24. padding-left: 2px;
  25. position: relative;
  26. }
  27. .box {
  28. background: #fff;
  29. border-radius: 5px;
  30. background: linear-gradient(45deg, orange, red);
  31. }
  32. .item .dot-left,.item .dot-right {
  33. display: block;
  34. width: 12px;
  35. height: 12px;
  36. border-radius: 50%;
  37. background: #f5f5f5;
  38. position: absolute;
  39. z-index: 999;
  40. }
  41. .item .dot-left {
  42. bottom: -6px;
  43. left: -6px;
  44. }
  45. .item .dot-right {
  46. bottom: -6px;
  47. right: -6px;
  48. }
  49. .item .page-group {
  50. position: absolute;
  51. top: 10px;
  52. left: -2px;
  53. width: 100%;
  54. max-width: 120px;
  55. }
  56. .item .page-group .fold-page {
  57. display: block;
  58. width: 2px;
  59. height: 5px;
  60. background: #db0113;
  61. transform: skewY(-40deg);
  62. position: absolute;
  63. top: -1px;
  64. left: 0;
  65. z-index: 0;
  66. }
  67. .item .page-group .page {
  68. position: absolute;
  69. z-index: 1;
  70. display: block;
  71. padding: 0 10px;
  72. height: 20px;
  73. background: linear-gradient(137deg, #ff5b5b 0%, #db0113 100%);
  74. border-radius: 0 20px 20px 0;
  75. color: #fff;
  76. text-align: center;
  77. font-size: 12px;
  78. overflow: hidden;
  79. }
  80. .item .content {
  81. width: 100%;
  82. height: 90px;
  83. border-bottom: 1px dotted #f5f5f5;
  84. position: relative;
  85. z-index: 2;
  86. }
  87. .item .footer {
  88. color: #fff;
  89. font-size: 12px;
  90. padding: 5px 15px 10px 15px;
  91. }
  92. .footer-label {
  93. line-height: 24px;
  94. }
  95. .item .ribbon {
  96. width: 80px;
  97. height: 20px;
  98. background: #dd0d1f;
  99. position: absolute;
  100. right: -20px;
  101. top: 10px;
  102. transform: rotateZ(45deg);
  103. text-align: center;
  104. color: #fff;
  105. font-size: 12px;
  106. }
  107. </style>

优惠券三

  1. // 优惠券三
  2. <div class="content"></div>
  3. .content {
  4. width: 300px;
  5. height: 150px;
  6. margin: auto;
  7. -webkit-mask: radial-gradient(circle at 10px, transparent 10px, red 0) -10px / 100% 30px;
  8. background: linear-gradient(45deg, orange, red);
  9. }

优惠券四

  1. // 优惠券四
  2. <div class="content"></div>
  3. .content {
  4. width: 300px;
  5. height: 130px;
  6. margin: auto;
  7. -webkit-mask: radial-gradient( circle at 50%, red 5px, transparent 0) 50% 50% / 100% 20px, radial-gradient(circle at 20px 20px, transparent 20px, red 0) -20px -20px / 50%;
  8. -webkit-mask-composite: destination-out;
  9. background: linear-gradient(45deg, orange, red);
  10. }

优惠券五

  1. // 优惠券五
  2. <div class="content"></div>
  3. .content {
  4. width: 300px;
  5. height: 130px;
  6. margin: auto;
  7. -webkit-mask: radial-gradient( circle at 5px, red 5px, transparent 0) -5px 50% / 100% 20px, radial-gradient(circle at 20px 20px, transparent 20px, red 0) -20px -20px / 50%;
  8. -webkit-mask-composite: destination-out;
  9. background: linear-gradient(45deg, orange, red);
  10. }

优惠券六

  1. // 优惠券六
  2. <div class="content"></div>
  3. .content {
  4. width: 300px;
  5. height: 150px;
  6. margin: auto;
  7. -webkit-mask: radial-gradient(circle at 20px 20px, transparent 20px, red 0) -20px -20px / 50%;
  8. background: linear-gradient(45deg, orange, red);
  9. }

优惠券七

  1. // 优惠券七
  2. <div class="content"></div>
  3. .content {
  4. width: 300px;
  5. height: 130px;
  6. margin: auto;
  7. -webkit-mask: radial-gradient(circle at 20px, transparent 20px, red 0) -20px;
  8. background: linear-gradient(45deg, orange, red);
  9. }

延伸:css 常见图形 (心形、五角星、梯形、椭圆形、钻石形、蛋形、八卦、圆锥形、月亮形)

https://wangxinyan.blog.csdn.net/article/details/126762028?spm=1001.2014.3001.5502

声明:本文内容由网友自发贡献,转载请注明出处:【wpsshop】
推荐阅读
相关标签
  

闽ICP备14008679号