BigTitle_List.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <template>
  2. <div class="list" v-if="headlinelist1">
  3. <div class="inner">
  4. <ul>
  5. <li v-for="item in headlinelist1" class="left">
  6. <!-- <i></i> -->
  7. <NuxtLink :to="{path:`/${item.pinyin}/${item.id}.html`}" :title="item.title">{{item.title}}</NuxtLink>
  8. </li>
  9. </ul>
  10. </div>
  11. </div>
  12. </template>
  13. <script setup>
  14. const props = defineProps({
  15. headlinelist1: Object
  16. });
  17. </script>
  18. <style lang="less" scoped>
  19. // 列表
  20. .list {
  21. height: 34px;
  22. margin: 16px 0 20px 0;
  23. .inner {
  24. height: 20px;
  25. margin: 0 auto;
  26. }
  27. ul {
  28. width: auto;
  29. height: 20px;
  30. box-sizing: border-box;
  31. padding-left: 180px;
  32. li:nth-child(1) {
  33. border-right: 1px solid #CCCCCC;
  34. }
  35. >li {
  36. width: 470px;
  37. margin-right: 30px;
  38. >i {
  39. display: inline-block;
  40. width: 13px;
  41. height: 13px;
  42. background-color: #d9d9d9;
  43. border-radius: 7px;
  44. // vertical-align: middle;
  45. margin-right: 10px;
  46. }
  47. >a {
  48. display: inline-block;
  49. width: 460px;
  50. height: 20px;
  51. white-space: nowrap;
  52. overflow: hidden;
  53. text-overflow: ellipsis;
  54. font-family: PingFang SC, PingFang SC;
  55. font-weight: 600;
  56. font-size: 18px;
  57. color: #333333;
  58. line-height: 16px;
  59. text-align: left;
  60. font-style: normal;
  61. text-transform: none;
  62. vertical-align: middle;
  63. }
  64. }
  65. >li:hover>i {
  66. background-color: #139602;
  67. }
  68. >li:hover>a {
  69. color: #139602;
  70. }
  71. }
  72. }
  73. </style>
  74. <style lang="less" scoped>
  75. @media screen and (max-width:800px){/*ipad_phone*/
  76. .list {height:auto;margin-top:5px;}
  77. .list .inner{height:auto;}
  78. .list ul{padding:0px; text-align:center;height:auto;overflow:hidden;}
  79. .list ul li{ width:90%;margin:0px auto;text-align:center;border:none!important;
  80. float:none;display:block;}
  81. .list ul li:nth-of-type(n+2){display:none;}
  82. .list ul li a{ width:100%; text-align:center;font-size:16px;font-weight:normal;
  83. word-break: keep-all; white-space: nowrap;overflow:hidden;text-overflow:ellipsis;}
  84. }
  85. </style>