我做了自己的wordpress主题,并使用了一个插件的照片画廊。现在我得到的是这样的东西:
<dl class='gallery-item'>
<dt class='gallery-icon landscape'>
<a href="http://*****.com/gallery/img_2233/">
<img class="attachment-thumbnail" height="150" width="150" alt="IMG_2233" src="http://*****.com/wp-content/uploads/2013/08/IMG_2233-150x150.jpg" ...>我可以在没有任何插件的情况下修改这段代码吗?如果是,在哪里?我想用宽度和高度表示百分比。
我需要以下结果:
<dl class='gallery-item'>
<dt class='gallery-icon landscape'>
<a href="http://*****.com/gallery/img_2233/">
<img class="attachment-thumbnail" height="60%" width="60%" alt="IMG_2233" src="http://*****.com/wp-content/uploads/2013/08/IMG_2233-150x150.jpg" ...>有什么建议可以更改画廊代码吗?
发布于 2014-02-21 15:22:12
在css中,可以重写附件-缩略图类。
将其添加到style.css或其他通过自定义css。
.attachment-thumbnail {
height: 60% !important;
width: 60% !important;
}否则,您可以搜索该术语“附件-缩略图”,并替换现有的高度和宽度设置。
https://stackoverflow.com/questions/21938072
复制相似问题