javascript - 移动设备上的全高图像

标签 javascript jquery html css mobile

如何在网站上放置图片 我有专辑(水平)图像。我需要在移动设备上放置图像高度为完整设备高度的图像......并且需要可用的水平滚动...... 像那样enter image description here

最佳答案

例子:

CSS 文件

html,body {
    height:100%;
    margin:0px;
}
.img-album {
    height:100%;
    overflow-y:hidden;
}
.img-album > img {
    height:100%;
}

HTML

<div class="img-album">
    <img src="http://cdn.wonderfulengineering.com/wp-content/uploads/2014/09/new-wallpaper-3.jpg" />
</div>

JSFiddle

关于javascript - 移动设备上的全高图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31384035/

相关文章:

javascript - 设置可拖动div的位置

jQuery 弹出窗口/模式问题

javascript - 嵌入多个 Twitter 用户的时间线 HTML

html - 最小可行图标代码

html - 什么占用了网页空间?

javascript - 使用 RSpec 和 JS 选择元素

javascript - HighCharts:如何将 xAxis 类别文本放入图表中

javascript - jQuery 选择器 : do not select input in div with given class

javascript - 显示 x 和 y 轴值以外的不同值

jquery - onclick 事件的顺序