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/

これを使用して、2 つの異なる CSS ファイルをロードできます。1 つはレスポンシブ画像、もう 1 つは静止画像です。それが役立つことを願っています。

于 2013-03-19T21:49:14.277 に答える