0

幻灯片图像在移动设备上正确缩放(响应式)但是当我在桌面上调整窗口大小时我不希望它们缩小


.slideshow-wrapper{
      width:100%;
      max-width:980px; //this is the original width of image
}
#slideshow{
 clear:both;
 z-index:-5;
 width:100%;
}
#slideshow img{
 width:100%;
 height:auto;
}

 jQuery.each(slideArray, function(index,value) {  $("<img src='img/slides/"+value+"'   
 width='980' height='450'>").appendTo("#slideshow");
 });

<div class="slideshow-wrapper">
 <div id="slideshow"> &nbsp; </div>
</div>
4

1 回答 1

0

这是检测移动用户的轻量级解决方案:https ://code.google.com/p/php-mobile-detect/

您可以使用它来加载两个不同的 CSS 文件。一种带有响应图像,一种带有静态图像。希望有帮助。

于 2013-03-19T21:49:14.277 回答