【问题标题】:Cloudinary responsive image with auto height instead of auto width具有自动高度而不是自动宽度的云响应图像
【发布时间】: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


    【解决方案1】:

    目前$.cloudinary.responsive() 方法仅支持自动宽度。 Cloudinary 也在努力扩展对自动高度的响应式支持。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-04-06
      • 2021-02-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-03-16
      • 1970-01-01
      相关资源
      最近更新 更多