【发布时间】:2015-10-22 19:58:26
【问题描述】:
所以我阅读了最近关于响应式图像标签的 Cloudinary 博客文章。特别是,我现在使用这一行(对于 Ruby on Rails 2.1):
cl_image_tag("example.jpg", :width => :auto, :responsive_placeholder => "blank") 然后<script type="text/javascript">$.cloudinary.responsive()</script>
这按预期工作; Cloudinary 响应式调整图像大小以缩放并尽可能多地占用 width。
但是,我想响应式调整图像的大小,以尽可能多地采用 height。最好的方法是什么,因为我认为 $.cloudinary.responsive() 没有内置它?
感谢您的宝贵时间!
我阅读的链接:
http://cloudinary.com/blog/how_to_automatically_create_images_for_responsive_design
https://github.com/cloudinary/cloudinary_js/blob/master/js/jquery.cloudinary.js#L675
【问题讨论】:
标签: jquery ruby-on-rails responsive-design image-resizing cloudinary