wordpress多说最新评论小工具美化技巧

  • 时间:2020-05-22 15:47:15
  • 分类:网络文摘
  • 阅读:133 次

时下,包括wordpress在内的很多博客都采用了社会化评论插件,其中尤以多说的使用者最多。虽然多说的使用很简单,外观样式能适应大多数主题模板,但由于不同的主题侧边栏宽度不同,该插件集成的最新评论小工具添加到侧边栏后,不能适应主题侧边栏宽度,文字或边框会超出主题宽度,影响美观。想要完美添加多说的最新评论小工具到wordpress侧边栏中,可以通过下面介绍的wordpress技巧,修改默认的外观样式来适应主题。以知更鸟的Ality主题为例:

wordpress多说最新评论小工具美化技巧

添加如下代码到wordpress主题样式文件style.css中:

  1. /** 多说 **/
  2. #ds-recent-comments li.ds-comment {
  3.     width: 87%;
  4.     font-size: 14px;
  5.     border-top: none !important;
  6.     border-bottom: 1px dashed #dadada;
  7.     word-wrap: normal !important;
  8. }
  9. #ds-recent-comments li.ds-comment .ds-avatar {
  10.     margin-top: 10px;
  11. }

自适应主题侧边栏宽度,上边框改为下边虚线框,自动截断文字。

非Ality的其它主题,可能还需要加上:

  1. whitewhite-space: nowrap;
  2. text-overflow: ellipsis;
  3. overflow: hidden;

用于文字超出自动截断。

推荐阅读:
5 Excellent 10x Content Examples To Boost Your Blog Traffic  How to Vlog: A Guide to Start Vlogging in 2020  5 Healthy Lifestyle Blogs to Know This 2020  Young People Changing the World One Idea at a Time  Remember Your Blog Is A Reflection Of You  Learn About Blog Content Planning  Adding PHPUnit Tests for Discord Cryptocurrency Bot Regarding th  Algorithm to Multiply Two Big Integers (String)  Use jQuery Migrate Helper Plugin to Fix the Classic Editor Error  How to Fix CloudFlare Error 1101 (Worker threw exception)? 
评论列表
添加评论