Help > Forum > 主题和外观 > 限制帖子的高度
限制帖子的高度
您可以使用以下说明限制帖子的高度。用户可以点击 “阅读更多” 链接来展开身高有限的帖子。
- 登录到您的Website Toolbox帐户。
- 单击 集成 链接。
- 在 集成 菜单中,单击 HTML 链接。
- 将以下代码插入到 论坛头标签 HTML 代码 文本框:
<script> window.addEventListener('load', (event) => { if (jQ(".wt-post-listing").length) { jQ(".post-body-content").each(function(){ if (jQ(this).children("[id^='post_message_']").outerHeight() > 300) { jQ(this).children("[id^='post_message_']").addClass('read-more-enabled').after('<a class="cleared text-block custom-read-more-link"><i>Read more âº</i></a>'); } }); jQ(".custom-read-more-link").click(function(){ jQ(this).addClass('hidden').prev('.read-more-enabled').removeClass('read-more-enabled'); }); } }); </script> <style> .wt-post-listing .post-body-content > [id^='post_message_'] { float: left; width: 100%; } .wt-post-listing .post-body-content > [id^='post_message_'].read-more-enabled { max-height: 300px; overflow: hidden; } </style>
- 保存 这些变化。
If you still need help, please contact us.