【发布时间】:2021-09-05 05:36:14
【问题描述】:
我正在尝试使我的图像具有响应性。我想使用宽度为 300 的图像,任何视口低于 768 像素,宽度为 1000 的图像,任何视口高于 768 像素。我尝试过使用 max-width 属性等,但它们没有任何意义。
<img srcset="https://res.cloudinary.com/xxx/image/upload/w_300,f_auto,q_auto,c_scale/v16242113131341/pc-template10_bzbdfk.webp 768w,
https://res.cloudinary.com/xxx/image/upload/w_900,q_auto,c_scale/v1624131231341/pc-template10_bzbdfk.webp 900w"
src='https://res.cloudinary.com/xxx/image/upload/q_auto,c_scale/v1624131231341/pc-template10_bzbdfk.webp' alt="PC" class="pctemplateforvideo" />
【问题讨论】:
-
我也有这个问题
标签: reactjs cloudinary