css 实现章节名称不换行,多余部分用 ... 代替

修改之前:


修改之后: 



代码: 

<p style = "white-space: nowrap;text-overflow: ellipsis;overflow: hidden;"><?= $d['name'] ?></p>
<i><?= $d['pen_name'] ?></i>
<i>
    <?php
    foreach ($d['tags'] as $t) {
        echo $t['tag_name'];
    }
    ?>
</i>
<i style = "white-space: nowrap;text-overflow: ellipsis;overflow: hidden;">上次阅读:<?= $d['last_chapter_name'] ?></i>

猜你喜欢

转载自blog.csdn.net/m_nanle_xiaobudiu/article/details/80438358