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

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

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

用于文字超出自动截断。

推荐阅读:
How to Design a Tic-Tac-Toe Game?  The Facebook Initial Coding Interview Experience  Facebook Onsite Interview Preparation Part 2: Coding Questions  The Process Killing Algorithms using Depth First Search or Bread  Breadth-First Search Algorithm to Solve Puzzle (Rotting Oranges)  Facebook Onsite Interview Preparation Part 1: Motivation/Bahavio  Celebrate WordPress’ 13th Birthday With These Interesting Facts  5 Ways to Use Your Smartphone to Build a Better Blog  The Most Expensive Domain Sales Ever  15 Ways Of How Not To Kill Your Leadership Authority 
评论列表
添加评论