CardTitle.vue 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <template>
  2. <div class="cardTitle">
  3. <div class="cardTitle_f"></div>
  4. {{ title }}
  5. </div>
  6. </template>
  7. <script>
  8. /**
  9. * card标题
  10. * @author LiuMengxiang
  11. * @Date 2024/09/09
  12. */
  13. export default {
  14. name: "CardTitle",
  15. props: {
  16. title: {
  17. type: String,
  18. required: true,
  19. },
  20. },
  21. computed: {},
  22. methods: {},
  23. };
  24. </script>
  25. <style lang="less" scoped>
  26. .cardTitle {
  27. position: relative;
  28. height: 50px;
  29. border-left: 3px solid #1b7ef2;
  30. background-image: --webkit-linear-gradient(to right, #1b7ef264, #1b7ef200);
  31. background-image: --moz-linear-gradient(to right, #1b7ef264, #1b7ef200);
  32. background-image: linear-gradient(to right, #1b7ef264, #1b7ef200);
  33. display: flex;
  34. align-content: center;
  35. align-items: center;
  36. color: #fff;
  37. font-size: 16px;
  38. line-height: 16px;
  39. &_f {
  40. margin: 0 10px;
  41. width: 10px;
  42. height: 14px;
  43. clip-path: polygon(0 0, 100% 50%, 0 100%, 0 0);
  44. background: #29f1fa;
  45. }
  46. &::before {
  47. position: absolute;
  48. content: "";
  49. width: 100%;
  50. height: 40px;
  51. top: 5px;
  52. left: 0;
  53. background: linear-gradient(to right, #ffffff64 50%, #00000000 0);
  54. background-size: 40px 100%;
  55. transform: skew(30deg, 0);
  56. z-index: -1;
  57. }
  58. }
  59. </style>