Plugin jQuery: jQuery RWD Images : Responsive Images Plugin

jQuery RWD Images : Responsive Images Plugin
http://www.jqueryrain.com/?http://mattstow.com/experiment/responsive-images-redux/responsive-images-redux-jquery-plugin.html
https://github.com/stowball/jQuery-rwdImages/archive/master.zip
https://github.com/stowball/jQuery-rwdImages
13/02/2014

Nội dung

jQuery RWD Images : Responsive Images Plugin

Responsive & Retina Content Images Redux using Media Queries & a base64 spacer GIF with the rwdImages jQuery plugin to allow the actual image to be saved, shared & printed.Retina screens will be served an image that’s twice the size, but gets scaled down.

The key is to use the intrinsic ratio technique to set the height of responsive images to 0, and give them a padding-bottom of the (width/height)*100. When the viewport width is large enough to show the images at the largest, real height, set the padding-bottom to the actual image height so the images don’t continue to create unnecessary padding.

The rwdImages jQuery plugin is used to wrap the image in a span and create an overlayed clone of the image with opacity: 0 so users can download or share the image.


Nguồn: www.jqueryrain.com/2014/02/jquery-rwd-images-responsive-images-plugin/


Chưa có phản hồi
Bạn vui lòng Đăng nhập để bình luận