优惠码标签

image.png

  1. <!--
  2. * @Author: hhn
  3. * @Date: 2020-09-01 09:12:41
  4. * @lastEditTime: Do not edit
  5. * @Description: 各种标签样式
  6. * @FilePath: \codehub\study\studying\html\tag.html
  7. -->
  8. <!DOCTYPE html>
  9. <html lang="en">
  10. <head>
  11. <meta charset="utf-8">
  12. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  13. <meta name="viewport" content="width=device-width, initial-scale=1">
  14. <title>标签</title>
  15. <link href="https://fonts.googleapis.com/css?family=Lato:400,400i|Roboto:500" rel="stylesheet">
  16. <!-- 为 Internet Explorer 支持而添加的 shiv -->
  17. <!--[if lt IE 9]>
  18. <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  19. <![endif]-->
  20. <style>
  21. .coupon-con.temp {
  22. background: linear-gradient(328deg, rgba(241, 74, 35, 1) 0, rgba(255, 144, 65, 1) 100%);
  23. }
  24. a {
  25. display: inline-block;
  26. margin-left: 14px;
  27. margin-top: 6px;
  28. font-size: inherit;
  29. text-decoration: none;
  30. cursor: pointer;
  31. }
  32. .coupon-con {
  33. top: 4px;
  34. right: 110px;
  35. width: 155px;
  36. height: 30px;
  37. font-size: 12px;
  38. line-height: 30px;
  39. background: linear-gradient(87deg, rgba(248, 227, 181, 1) 0, rgba(218, 178, 116, 1) 100%);
  40. border-radius: 2px 15px 2px 15px;
  41. color: #463d2f;
  42. align-items: center;
  43. overflow: hidden;
  44. text-align: center;
  45. font-weight: bold;
  46. }
  47. .activity-con {
  48. cursor: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAPVklEQVRoQ8WZd3gU1frHv2e276ZvNmWzSTYhjTSIQZp0c+PlClcRUAETQEHqDwtXqVGxAioiIHkoSkAU9CoJWCgXiYgkqBcTEqqkt03bbLaXmZ35PbMiP+UGzAbu8zvPM//MnPJ+3nPe85YhuM3GcRwBILVarf4lJcW+LpaESQSS/q2trUvVavVFmqZ32u2m5sTEVEP//v1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s2rh4un3pKaBL2jVmA1Y+eLTSIgN/Z2gBPAIz1fOb/J/ghCcrzbgrVd3IUjoCz4vNhNg2ry5q8eOHftaX7T/p0fomj2kvbg670dXfaNUIZN5EvQmqxFzljyB9JRISETUr9kX0w0QvpR6YyMw2xmUnK3Cxjc+RIom1pO4OWkaAQlx9dNzc8b079+/7r8GwE98srh4y77tOxZF+vp79EvTDJoNnYi/KxXjsvojIzkCAtzgcQkBSwQ4/dMvOH7kLKor6hGhDPaUVwQUhQZTt+uh2bPWT3nooVcJId4EWX9g7VV5XafTaY8cPry/6MO9Q5IjIsGy/E9twOpwwEjbIA9VYPbjE3FXmhZCSgjaTXti/j27D0Ng5hAgVUAiFHnSSaeLxuW2Fixe9vyP995771S5XN7QV+336gj9NjnHcUm79+w5mr92fVREaCjMdptHowFyhaficKWhCS4hi8BgH3S2GeEvlKNfeBjcHOspRbZ1d8NHKoWDobFmw9vnhw0bxt/75tsR3luAoJ07dxYcLiyaWHXxEgSEYPDYMS6Vv7/jmtkSiqIYIpF0cQ6Hik/I+D/2HEAaGhsll8vKxUQohDpW63zmuee2jxk3bsntCu8VAN/ZbDaHXLp06XGDwfAXl9PpqwoPX6Vvb6//TRCRSMSlpqa6zpSVSSTXXjIMQ8LCwoZUV1U9o42J4Y31eHJy8scBAQF8oHTb7X8BRfm5i39zS2YAAAAASUVORK5CYII=) 22 0, auto !important;
  49. }
  50. .activity-con:before {
  51. content: "";
  52. position: absolute;
  53. left: -400px;
  54. top: -400px;
  55. width: 100px;
  56. height: 0;
  57. background-color: rgba(255, 255, 255, .3);
  58. -webkit-transform: rotate(-45deg);
  59. -moz-transform: rotate(-45deg);
  60. -ms-transform: rotate(-45deg);
  61. -o-transform: rotate(-45deg);
  62. transform: rotate(-45deg);
  63. /* -webkit-animation: searchLights 1s ease-in 1s infinite;
  64. -o-animation: searchLights 1s ease-in 1s infinite; */
  65. animation: searchLights 1.5s ease-in 1s infinite;
  66. box-shadow: 0 0 10px 10px rgba(255, 255, 255, .3);
  67. }
  68. .coupon-con span:nth-of-type(1) {
  69. color: #fff;
  70. width: 53px;
  71. background: #494238;
  72. float: left;
  73. }
  74. .coupon-con.temp span:nth-of-type(2) {
  75. color: #fff;
  76. float: right;
  77. width: 102px;
  78. }
  79. /* */
  80. @-o-keyframes searchLights {
  81. from {
  82. left: -100px;
  83. top: 0
  84. }
  85. to {
  86. left: 100%;
  87. top: 22px
  88. }
  89. }
  90. @-moz-keyframes searchLights {
  91. from {
  92. left: -100px;
  93. top: 0
  94. }
  95. to {
  96. left: 100%;
  97. top: 22px
  98. }
  99. }
  100. @keyframes searchLights {
  101. from {
  102. left: -100px;
  103. top: 0
  104. }
  105. to {
  106. left: 100%;
  107. top: 22px
  108. }
  109. }
  110. @keyframes btnClick {
  111. 0% {
  112. transform: scale(1)
  113. }
  114. 50% {
  115. transform: scale(.95)
  116. }
  117. 100% {
  118. transform: scale(1)
  119. }
  120. }
  121. @keyframes moveIn {
  122. from {
  123. transform: scale(1) rotate(0)
  124. }
  125. to {
  126. transform: scale(0) rotate(360deg);
  127. right: 0;
  128. margin-right: 0;
  129. top: 30px;
  130. display: none
  131. }
  132. }
  133. @keyframes gift {
  134. 0% {
  135. transform: rotate(0);
  136. transition-timing-function: cubic-bezier(.215, .61, .355, 1)
  137. }
  138. 10% {
  139. transform: rotate(-12deg);
  140. transition-timing-function: cubic-bezier(.215, .61, .355, 1)
  141. }
  142. 20% {
  143. transform: rotate(12deg);
  144. transition-timing-function: cubic-bezier(.215, .61, .355, 1)
  145. }
  146. 28% {
  147. transform: rotate(-10deg);
  148. transition-timing-function: cubic-bezier(.215, .61, .355, 1)
  149. }
  150. 36% {
  151. transform: rotate(10deg);
  152. transition-timing-function: cubic-bezier(.755, .5, .855, .06)
  153. }
  154. 42% {
  155. transform: rotate(-8deg);
  156. transition-timing-function: cubic-bezier(.755, .5, .855, .06)
  157. }
  158. 48% {
  159. transform: rotate(8deg);
  160. transition-timing-function: cubic-bezier(.755, .5, .855, .06)
  161. }
  162. 52% {
  163. transform: rotate(-4deg);
  164. transition-timing-function: cubic-bezier(.755, .5, .855, .06)
  165. }
  166. 56% {
  167. transform: rotate(4deg);
  168. transition-timing-function: cubic-bezier(.755, .5, .855, .06)
  169. }
  170. 60% {
  171. transform: rotate(0);
  172. transition-timing-function: cubic-bezier(.755, .5, .855, .06)
  173. }
  174. 100% {
  175. transform: rotate(0);
  176. transition-timing-function: cubic-bezier(.215, .61, .355, 1)
  177. }
  178. }
  179. </style>
  180. </head>
  181. <body>
  182. <a class="activity-con coupon-con temp">
  183. <span>7.5折</span>
  184. <span>优惠码限时领取</span>
  185. </a>
  186. </body>
  187. </html>

点击查看【codepen】

标签装饰

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <title>adorn 点缀</title>
  8. <style>
  9. body {
  10. display: flex;
  11. justify-content: space-around;
  12. flex-wrap: wrap;
  13. }
  14. .card,
  15. .card-head,
  16. .card-body,
  17. .card-boot {
  18. position: relative;
  19. }
  20. .card-body {
  21. width: 262px;
  22. height: 147px;
  23. color: #FFFFFF;
  24. text-align: center;
  25. overflow: hidden;
  26. position: relative;
  27. display: flex;
  28. justify-content: center;
  29. align-items: center;
  30. }
  31. .adorn {
  32. position: absolute;
  33. }
  34. .course-periods {
  35. /* 层级在card-border上 */
  36. z-index: 2;
  37. position: absolute;
  38. display: block;
  39. left: 0px;
  40. top: 0px;
  41. font-size: 10px;
  42. color: #FFFFFF;
  43. width: 50px;
  44. height: 25px;
  45. text-align: center;
  46. line-height: 25px;
  47. }
  48. .course-periods:after {
  49. z-index: -1;
  50. content: '';
  51. display: block;
  52. position: absolute;
  53. top: 0;
  54. left: -10px;
  55. width: 60px;
  56. height: 25px;
  57. transform: skewX(-15deg);
  58. background: rgba(0, 0, 0, 0.3);
  59. border-radius: 0 0 6px 0;
  60. }
  61. .card-body img.bg-cover {
  62. position: absolute;
  63. right: 0px;
  64. top: 0px;
  65. display: block;
  66. width: 100%;
  67. }
  68. .card-body .card-border::after {
  69. position: absolute;
  70. top: 10px;
  71. left: 10px;
  72. right: 10px;
  73. bottom: 10px;
  74. z-index: 2;
  75. display: inline-block;
  76. border: 2px solid #fff;
  77. content: "";
  78. }
  79. .card-body .title {
  80. z-index: 1;
  81. max-width: 170px;
  82. max-height: 60px;
  83. font-size: 20px;
  84. font-weight: 700;
  85. line-height: 1.5;
  86. color: #fff;
  87. display: -webkit-box;
  88. -webkit-box-orient: vertical;
  89. -webkit-line-clamp: 2;
  90. overflow: hidden;
  91. }
  92. </style>
  93. </head>
  94. <body>
  95. <div class="card">
  96. <div class="card-head">
  97. </div>
  98. <div class="card-body">
  99. <img class="bg-cover" src="./basic_doc.png" />
  100. <div class="card-border"></div>
  101. <span class="course-periods">50篇</span>
  102. <div class="title">独在异乡<br>为异客</div>
  103. </div>
  104. <div class="card-boot">
  105. </div>
  106. </div>
  107. <div class="card">
  108. <div class="card-head">
  109. </div>
  110. <div class="card-body ">
  111. <img class="bg-cover" src="./basic_feature.png" />
  112. <span class="course-periods">50篇</span>
  113. <div class="title">独在异乡<br>为异客</div>
  114. </div>
  115. <div class="card-boot">
  116. </div>
  117. </div>
  118. <div class="card">
  119. <div class="card-head">
  120. </div>
  121. <div class="card-body ">
  122. <img class="bg-cover" src="./basic_pdf.png" />
  123. <span class="course-periods">50篇</span>
  124. <div class="title">独在异乡<br>为异客</div>
  125. </div>
  126. <div class="card-boot">
  127. </div>
  128. </div>
  129. <div class="card">
  130. <div class="card-head">
  131. </div>
  132. <div class="card-body ">
  133. <img class="bg-cover" src="./basic_ppt.png" />
  134. <span class="course-periods">50篇</span>
  135. <div class="title">独在异乡<br>为异客</div>
  136. </div>
  137. <div class="card-boot">
  138. </div>
  139. </div>
  140. <div class="card">
  141. <div class="card-head">
  142. </div>
  143. <div class="card-body">
  144. <img class="bg-cover" src="./basic_xls.png" />
  145. <span class="course-periods">50篇</span>
  146. <div class="title">独在异乡<br>为异客</div>
  147. </div>
  148. <div class="card-boot">
  149. </div>
  150. </div>
  151. <div class="card">
  152. <div class="card-head">
  153. </div>
  154. <div class="card-body ">
  155. <img class="bg-cover" src="./ep_live.png" />
  156. <span class="course-periods">50篇</span>
  157. <div class="title" style="color:#4f26ef">独在异乡<br>为异客</div>
  158. </div>
  159. <div class="card-boot">
  160. </div>
  161. </div>
  162. <div class="card">
  163. <div class="card-head">
  164. </div>
  165. <div class="card-body ">
  166. <img class="bg-cover" src="./5654.png" />
  167. <div class="card-border"></div>
  168. <span class="course-periods">50篇</span>
  169. <div class="title">独在异乡<br>为异客</div>
  170. </div>
  171. <div class="card-boot">
  172. </div>
  173. </div>
  174. </body>
  175. </html>

图片:https://www.yuque.com/southerly/images/artboards/71945
image.png

badge 徽章 花朵

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <title>zhui-badge</title>
  8. <style>
  9. .zhui-badge {
  10. font-family: STKaiti;
  11. position: relative;
  12. display: inline-block;
  13. transform: scale(6);
  14. }
  15. .zhui-badge-wrapper {
  16. position: absolute;
  17. top: 5px;
  18. right: 15px;
  19. z-index: 1
  20. }
  21. .zhui-badge-content {
  22. -webkit-box-pack: center;
  23. -ms-flex-pack: center;
  24. justify-content: center;
  25. -webkit-box-align: center;
  26. -ms-flex-align: center;
  27. align-items: center;
  28. top: -11px;
  29. left: 7px;
  30. width: 16px;
  31. height: 16px;
  32. font-size: 12px;
  33. background: #fecc11;
  34. color: #fff;
  35. border-radius: 50%;
  36. -webkit-transform: scale(.8);
  37. transform: scale(.8)
  38. }
  39. .zhui-badge-content,
  40. .zhui-badge-leaf {
  41. position: absolute;
  42. display: -webkit-box;
  43. display: -ms-flexbox;
  44. display: flex
  45. }
  46. .zhui-badge-leaf {
  47. top: -15px;
  48. right: -15px
  49. }
  50. .zhui-badge-leaf,
  51. .zhui-badge-leaf:after {
  52. height: 12px;
  53. width: 12px;
  54. background: #fff;
  55. border-radius: 2px 20px;
  56. -webkit-transform-origin: bottom right;
  57. transform-origin: bottom right
  58. }
  59. .zhui-badge-leaf:after {
  60. content: "";
  61. position: absolute;
  62. top: 0;
  63. left: 0
  64. }
  65. .zhui-badge-leaf-outer:after {
  66. -webkit-transform: rotate(60deg);
  67. transform: rotate(60deg)
  68. }
  69. .zhui-badge-leaf-inner,
  70. .zhui-badge-leaf-inner:after {
  71. -webkit-box-shadow: -5px -5px 10px 3px rgba(0, 0, 0, .06);
  72. box-shadow: -5px -5px 10px 3px rgba(0, 0, 0, .06)
  73. }
  74. .zhui-badge-leaf-inner:after {
  75. -webkit-transform: rotate(60deg);
  76. transform: rotate(60deg)
  77. }
  78. .zhui-badge-leaf-outer:first-child {
  79. -webkit-transform: rotate(0deg);
  80. transform: rotate(0deg)
  81. }
  82. .zhui-badge-leaf-outer:nth-child(2) {
  83. -webkit-transform: rotate(120deg);
  84. transform: rotate(120deg)
  85. }
  86. .zhui-badge-leaf-outer:nth-child(3) {
  87. -webkit-transform: rotate(240deg);
  88. transform: rotate(240deg)
  89. }
  90. .zhui-badge-leaf-inner:nth-child(4) {
  91. -webkit-transform: rotate(30deg);
  92. transform: rotate(30deg)
  93. }
  94. .zhui-badge-leaf-inner:nth-child(5) {
  95. -webkit-transform: rotate(150deg);
  96. transform: rotate(150deg)
  97. }
  98. .zhui-badge-leaf-inner:nth-child(6) {
  99. -webkit-transform: rotate(270deg);
  100. transform: rotate(270deg)
  101. }
  102. body {
  103. background-color: aliceblue;
  104. padding: 400px;
  105. }
  106. </style>
  107. </head>
  108. <body>
  109. <div class="zhui-badge">
  110. <span style="display: block; width: 50px; height: 50px; background: rgb(221, 221, 221);"></span>
  111. <div class="zhui-badge-wrapper">
  112. <span class="zhui-badge-leaf zhui-badge-leaf-outer"></span>
  113. <span class="zhui-badge-leaf zhui-badge-leaf-outer"></span>
  114. <span class="zhui-badge-leaf zhui-badge-leaf-outer"></span>
  115. <span class="zhui-badge-leaf zhui-badge-leaf-inner"></span>
  116. <span class="zhui-badge-leaf zhui-badge-leaf-inner"></span>
  117. <span class="zhui-badge-leaf zhui-badge-leaf-inner"></span>
  118. <span class="zhui-badge-content">99</span>
  119. </div>
  120. </div>
  121. </body>
  122. </html>

image.png