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

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

时下,包括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 Summary Ranges using O(N) Two Pointer Algorithm?  Microbit Programming: How to Make a Catching-Apple Game by Using  The enumerate method in Magik Programming  Add Two Numbers by Two Linked List (most significant digit comes  The enumerate function in Javascript  How to Check If Word Is Valid After Substitutions using Stack or  5 Best Instagram Marketing Strategies for Blogs  Want to Generate More Engagement on Twitter?  4 Handy Tips for Bloggers Exploring a New Industry  3 Ambitious Blog Subjects for Small Businesses 
评论列表
添加评论