给wotdpress知更鸟Begin主题缩略图添加圆角边框

2018年12月24日 1131点热度 0人点赞 0条评论

很多时候看知更鸟的缩略图较生硬,今天分享一个代码,把缩略图进行圆角处理!

找到style.css文件里缩略图的class名 .thumbnail

  1. /** 缩略图 **/
  2. .thumbnail {
  3.     position: relative;
  4.     float: left;
  5.     max-width: 200px;
  6.     height: auto;
  7.     clear: both;
  8.     margin: 1px 20px 0 0;
  9.     overflow: hidden;
  10.     transition-duration: .5s;
  11. }

在{ }中间添加以下两行属性:

  1. //缩略图添加边框
  2. border:1px solid #ccc;
  3. padding:4px;

自用的代码:

  1. /** 缩略图 **/
  2. .thumbnail {
  3.  position: relative;
  4.     float: left;
  5.     max-width: 200px;
  6.     height: auto;
  7.     clear: both;
  8.     margin: 1px 20px 0 0;
  9.     overflow: hidden;
  10.     transition-duration: .5s;
  11.     border-radius: 8px;
  12.     -webkit-box-shadow: rgba(0,0,0,0.496094) 3px 3px 3px;
  13. }

hank

这个人很懒,什么都没留下

文章评论