我已将 Fotorama 画廊添加到站点,但它在移动设备上没有响应。我认为,因为 data-width=100% 并且它完全使用图像或中间 div 的宽度。
<div class="wrapper">
...
<div class="middle">
<div class="gallery"><div class="fotorama" data-nav="thumbs" data-arrows="true" data-click="true" data-swipe="true"
data-width="100%"
data-ratio="800/600"
data-maxwidth="889"
data-maxheight="604"
data-loop="true">
...
和CSS:
#wrapper {
max-width: 960px;
margin: 0px auto;
min-height: 100%;
position: relative;
background-color: #fbfbfb;
-moz-box-shadow: 0 0 10px rgba(0,0,0,.47);
-webkit-box-shadow: 0 0 10px rgba(0,0,0,.47);
box-shadow: 0 0 10px rgba(0,0,0,.47);
}
.middle {
width: 100%;
padding: 1% 0 2%;
position: relative;
display: table;
}
.gallery {margin: 1.1% 3% 0 3%;}
最佳答案
我看不出问题in your code .
也许你只需要:
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
<meta name="HandheldFriendly" content="true">
在页面的头部声明它已针对移动设备进行了调整,
并且他们不应该使用自动缩放。
关于jquery - 响应式 Fotorama。如何响应中间div?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24588001/