• 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:49strong>
    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

  • 相关阅读:
    静态代码块和构造代码块
    1038 统计同成绩学生
    基于SpringBoot+Vue+uniapp的疫情期间高校人员的详细设计和实现(源码+lw+部署文档+讲解等)
    函数的扩展
    AIGC(生成式AI)试用 8 -- 曾经的难题
    SpringMVC中有哪些常用的注解呢?
    如何使用Cygwin编译最新版的Redis源码,生成适用于Windows的Redis
    生命形式问题
    从开始学习算法到学习计算机视觉
    WSL VScode连接文件后无法修改(修改报错)
  • 原文地址:https://blog.csdn.net/qq_34402069/article/details/126852595