我在我的导轨应用程序中使用回形针上传图像。 有选项可以调整图像大小。导轨回形针图像大小取决于设备大小
has_attached_file :photo, styles: {large: '1000x1000>', medium: '500x500>'}
是否有可能采取大型设备,如iPad或大型全屏设备的图像和移动设备的中型图像?
我执行图像那样:
<div class="teaser" style="background: url(<%[email protected]_url %>)"></div>