JS代码如下
<script>
$(window).load(function(){
var width=$(window).width();
var img_1=$(".hot_img_auto").css("height");//获取图片高
if(980<=width<=1920){
$(".hot_content").css("height",img_1);//把图片高给它外层的div
}
})

$(window).resize(function(){
var width=$(window).width();
var img_1=$(".hot_img_auto").css("height");//获取图片高
if(980<=width<=1920){
$(".hot_content").css("height",img_1);//把图片高给它外层的div
}
})
</script>

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-22
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-13
相关资源
相似解决方案