继续建立一个免费的主题。正在做CSS画廊的工作。Wordpress会自动向图库添加左边框。例句:http://themeforward.com/demo2/features/gallery-2/,那么,我该如何摆脱这种令人讨厌的利润呢?
/* Gallery */
.gallery {
margin:30px auto auto;
text-align:center
}
.gallery-item {
float:left;
margin-top:10px;
text-align:center;
width:33%
}
.gallery img {
border:1px solid #E6E6E6!important;
margin-bottom:27px;
padding:5px
}
.gallery img:active {
margin:1px 0 0
}
.gallery-caption {
display:none;
font-size:.8em;
margin-left:0
}
.gal_img {
margin:20px auto 0!important;
text-align:center
}
.gal_caption p {
font-size:1.3em!important;
font-weight:700;
text-align:center;
font-family:Arial, Helvetica, sans-serif!important
}
.gal_description p {
font-size:1.1em!important;
text-align:center
}发布于 2011-07-12 17:30:08
最简单的方法是删除WordPress注入的内联样式定义,这样您就可以通过主题完全控制样式:
/**
* Remove default gallery shortcode inline styles
*/
add_filter( 'use_default_gallery_style', '__return_false' );请注意,这将删除所有WordPress注入的图库CSS定义,因此您可能需要将一些原始样式定义移植到样式表中。
https://wordpress.stackexchange.com/questions/22747
复制相似问题