wordpress知更鸟Begin主题缩略图及方框添加圆角边框 ——WordPress美化教程
2018-01-16 13:29
小鹿推广
找到style.css文件里缩略图的class名 .thumbnail
- .thumbnail{
- position:relative;
- float:left;
- max-width:200px;
- height:auto;
- clear:both;
- margin:1px20px00;
- overflow:hidden;
- transition-duration:.5s;
- }
在{ }中间添加以下两行属性:
- //缩略图添加边框
- border:1pxsolid#ccc;
- padding:4px;
添加后完整代码如下:
- .thumbnail{
- position:relative;
- float:left;
- max-width:200px;
- height:auto;
- clear:both;
- margin:1px20px00;
- border:1pxsolid#ccc;
- padding:4px;
- overflow:hidden;
- transition-duration:.5s;
- }
自用的代码:
[reply]
- .thumbnail{
- position:relative;
- float:left;
- max-width:200px;
- height:auto;
- clear:both;
- margin:1px20px00;
- overflow:hidden;
- transition-duration:.5s;
- border-radius:8px;
- -webkit-box-shadow:rgba(0,0,0,0.496094)3px3px3px;
- }
如果出现手机端不兼容的情况请用下面代码试试(最简单直接建议使用):
- .thumbnail{
- border-radius:6px;
- box-shadow:rgba(0,0,0,0.5)3px3px3px;
- }
[/reply]
效果如下:

首页幻灯片圆角
- #sliderimg{
- border-radius: 8px;
- }

- #slider img,.single-tag li a,#sliderimg,.cat-box,.cat-title,.fadeInUp,#sidebarh3,.cat-grid-title,.cat-square-title,.nbs-flexisel-container,img,h1,h2,h3,h4,h5,h6,a,.nav-menu,.nav-menu*,.type-cata,.child-cata,.link-alla
- {border-radius:8px
- }
备注缩略图阴影圆角效果要单独添加,上图样式可自行调整删减。




下一篇 >>
总结2018最新百度算法更新大全(2013 – 2018)