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

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

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

用于文字超出自动截断。

推荐阅读:
A 7-Step Guide to Creating Your Content Editorial Calendar for 2  How to Find and Hire a Ghostwriter for Your Blog  Showcase About the Best 30+ Web Tools and Services on the Market  3 Incredible Landing Pages And What We Can Learn From Them  What is Cycle Counting and How to Implement It in Your Retail Bu  4 Reasons Why Your Blog is Struggling to Find an Audience  6 Best Fashion Bloggers for Style Inspiration  The Strategy You Need to Write Better Blog Posts Than Your Compe  How to Improve Your Blog’s Bounce Rate (and Why You Should)  Does Your SME Have A Disaster Recovery Plan? 
评论列表
添加评论