【问题标题】:How to adjust the properties of the 'large' image size in ACF plugin for wordpress如何在 wordpress 的 ACF 插件中调整“大”图像大小的属性
【发布时间】:2015-06-14 22:18:20
【问题描述】:

对于 wordpress 的 ACF(高级自定义字段)插件,在其所见即所得编辑器字段中,我希望能够更改大图像属性的默认图像大小以使其响应而不是将其设置为定义的高度和以像素为单位的宽度。有没有办法调整这个?使用 css 还是通过调整 ACF 的核心文件?基本上,我希望包装我的图像的 html 代码类似于

<img src"url/path/to/image" width="100%" height="auto">

而不是

<img src"url/path/to/image" width="1024px" height="576px"> 

【问题讨论】:

    标签: html css wordpress advanced-custom-fields


    【解决方案1】:

    这是我用来使 WordPress 所见即所得图像响应的 CSS:

    .entry-content img, .comment-content img, .widget img, .entry-summary img, .wp-caption { max-width: 100%; }
    img[class*="align"], img[class*="wp-image-"], .comment-content img[height], .entry-content img, .entry-summary img, img[class*="attachment-"] { height: auto; }
    img.size-full, img.size-large, .wp-post-image, .post-thumbnail img { max-width: 100%; height: auto; }
    

    【讨论】:

      猜你喜欢
      • 2017-06-01
      • 2014-10-29
      • 1970-01-01
      • 2017-02-04
      • 2013-11-26
      • 2012-08-18
      • 2012-07-31
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多