使用css,这不是我认为的正确方法,您可以使用此函数“ wp_trim_words( get_the_content(), 40, '...' );
”否则, wordwrap()
PHP函数可以使用此函数来包装或修剪动态内容,而不是关闭“溢出:隐藏” css。
将该代码用于h2
overflow: hidden;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.