Linux 软件免费装
Banner图

WP Fluid Images

开发者 ramseyp
更新时间 2012年5月4日 21:25
捐献地址: 去捐款
PHP版本: 3.0 及以上
WordPress版本: 3.3.1

标签

responsive images fluid

下载

1.0.1 1.1 1.1.1

详情介绍:

WP Fluid Images runs when you insert an image into a Post or Page. It removes the fixed width and height attributes from the image tag. If you insert an image from the image uploader, by default, a width and height attribute is inserted into the image tag with fixed pixel values. This plugin prevents this from happening, because this can be problematic if your theme is built using responsive design methods. The plugin also adds a style tag in the header that sets a max-width rule of 97%. This insures that any image in a Post or Page won’t extend past the width of the Post or Page. If you resize an image in the Visual Editor, a new width and height attribute get added to the image. WP Fluid Images loads a jQuery script that examines the .post, or .page divs for image tags. It calculate the image’s width as a percentage of the .post or .page div, removes the width and height attributes, and adds a style attribute with a width value set to the calculated percentage. If you insert an image with a caption, instead of applying a style attribute with a width as a percentage to the image, the plugin will apply it to the .wp-caption div.

安装:

  1. Upload the folder fluid-images to the /wp-content/plugins/ directory
  2. Activate the plugin through the 'Plugins' menu in WordPress.

升级注意事项:

Initial Release.

常见问题:

What is Fluid Images?

Fluid Images is the concept of having images that size proportionally and smoothly as your web page's width increases or decreases. Ethan Marcotte wrote an article on the idea at A List Apart: http://www.alistapart.com/articles/fluid-images/ You can also learn more at his site: http://unstoppablerobotninja.com/entry/fluid-images/

What is Responsive Web Design?

Responsive Web Design is the idea of having your site's design adjust based on the width of the browser window. This allows you to create a single, adjustable design that works regardless of the size of the device, rather than building a design for desktop browsing, another for tablets, another for mobile phones, etc.

更新日志:

1.1.1 Corrected error in the javascript. Thanks to Hans Kuijpers for catching the error. 1.1 The parent element used for calculating the width as a percentage is now .hentry, instead of .page or .post. Detects if there is an enclosing .wp-caption div. If so, the percentage is calculated from that instead of the img tag. Changed the style declaration that's written to wp-head to read: .hentry-img { max-width: 97%;} Updated Paypal button code for donations. 1.0.1 Bugfix - corrected error in writing the style attribute on a resized image. Bugfix - corrected selector to not include the body tag when selecting elements. 1.0