<template> <div class="list"> <div class="inner"> <ul> <li v-for="item in headlinelist1" class="left"> <NuxtLink :to="{path:`/${item.pinyin}/${item.id}.html`}" :title="item.title">{{item.title}}</NuxtLink> </li> </ul> </div> </div> </template> <script setup> const props = defineProps({ headlinelist1: Object }); </script> <style lang="less" scoped> // 列表 .list { height: 34px; margin: 16px 0 20px 0; .inner { height: 20px; margin: 0 auto; } ul { width: auto; height: 20px; box-sizing: border-box; padding-left: 180px; li:nth-child(1) { border-right: 1px solid #CCCCCC; } >li { width: 470px; margin-right: 30px; >i { display: inline-block; width: 13px; height: 13px; background-color: #d9d9d9; border-radius: 7px; // vertical-align: middle; margin-right: 10px; } >a { display: inline-block; width: 460px; height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: PingFang SC, PingFang SC; font-weight: 600; font-size: 18px; color: #333333; line-height: 16px; text-align: left; font-style: normal; text-transform: none; vertical-align: middle; } } >li:hover>i { background-color: #139602; } >li:hover>a { color: #139602; } } } </style>