HotNews.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <template>
  2. <div class="title">
  3. <h4>
  4. 热点资讯
  5. <span>查看更多</span>
  6. </h4>
  7. </div>
  8. <ul class="messageList">
  9. <li v-for="item in 14">
  10. <span>{{ item }}</span>
  11. <NuxtLink>数说新中国75年|人民文化生活日益丰富 文...</NuxtLink>
  12. </li>
  13. </ul>
  14. </template>
  15. <style lang="less" scoped>
  16. .title {
  17. width: 380px;
  18. height: 40px;
  19. line-height: 40px;
  20. // border-top: 1px solid #139602;
  21. border-bottom: 1px solid #e7e7e7;
  22. background-color: #fbfbfb;
  23. >h4 {
  24. font-family: Microsoft YaHei, Microsoft YaHei;
  25. font-weight: 400;
  26. margin-left: 20px;
  27. font-size: 20px;
  28. color: #000000;
  29. text-align: left;
  30. font-style: normal;
  31. text-transform: none;
  32. >span {
  33. float: right;
  34. font-family: Microsoft YaHei, Microsoft YaHei;
  35. font-weight: 400;
  36. font-size: 14px;
  37. margin-right: 10px;
  38. color: #999999;
  39. text-align: left;
  40. font-style: normal;
  41. text-transform: none;
  42. }
  43. }
  44. }
  45. .messageList {
  46. height: 563px;
  47. padding-top: 15px;
  48. margin-bottom: 30px;
  49. background-color: #fbfbfb;
  50. >li {
  51. height: 24px;
  52. margin-bottom: 16px;
  53. >span {
  54. display: inline-block;
  55. width: 24px;
  56. height: 24px;
  57. margin-left: 22px;
  58. line-height: 24px;
  59. vertical-align: middle;
  60. text-align: center;
  61. background-color: #cecece;
  62. font-family: Microsoft YaHei, Microsoft YaHei;
  63. font-weight: 400;
  64. font-size: 18px;
  65. color: #FFFFFF;
  66. text-align: center;
  67. font-style: normal;
  68. text-transform: none;
  69. }
  70. >a {
  71. width: 256px;
  72. height: 21px;
  73. font-family: Microsoft YaHei, Microsoft YaHei;
  74. font-weight: 400;
  75. font-size: 16px;
  76. color: #333333;
  77. line-height: 19px;
  78. text-align: left;
  79. font-style: normal;
  80. text-transform: none;
  81. padding-left: 10px;
  82. }
  83. }
  84. >li:hover>a {
  85. color: #139602;
  86. }
  87. >li:nth-child(1)>span {
  88. background-color: #00c524;
  89. }
  90. >li:nth-child(2)>span {
  91. background-color: #ffdf27;
  92. }
  93. >li:nth-child(3)>span {
  94. background-color: #f3c57f;
  95. }
  96. }
  97. </style>