gpt4 book ai didi

javascript - 如何为文本提供 readmore?

转载 作者:行者123 更新时间:2023-11-30 15:59:29 27 4
gpt4 key购买 nike

我在 p 标签中有一段很长的文字。

        <p> type and scrambled it to make a type specimen book. 
It has survived not only five centuries, but also the leap into
electronic typesetting, remaining essentially unchanged. It was popularised
in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum</P>

如果文本大于 100 个字符(例如在 whatsapp 中),我想显示一个阅读更多链接。如何实现?我是否可以通过 pur css 来完成?还是需要js?它应该在 readmore 和 readless 之间切换。

最佳答案

请引用这个link .希望对您有所帮助。

关于javascript - 如何为文本提供 readmore?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37982921/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com