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

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

时下,包括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;

用于文字超出自动截断。

推荐阅读:
Why the Speed of Your Site Should Be a Priority  The Most Destructive Viruses of All Time  Popular Websites You Didn’t Know Started as Blogs  Compute the Number Spiral Diagonals  Algorithms to Group Words by Anagrams  Algorithm to Count the Largest Group of Digit Sums  How to Delete Columns to Make Sorted Table?  How to Check If a Integer is a Strobogrammatic Number?  How to Find Pivot Index of Array?  The Image Flood Fill Algorithm (C++) 
评论列表
添加评论