Cordova CSS缩放图像在屏幕上

时间:2014-06-04 12:35:50

标签: html css cordova

我需要一张整个屏幕的图片,它可以正常工作,但图片应该是它不会低于页脚的限制,而在肖像时,图像只是"卡住"。

image to illustrate the problem

HTML

<!-- Content -->

<div data-role="content">
    <img src="http://placehold.it/400x288" class="img">
</div>
.img {
    width: 100%;
    height: 90%; /* No effect */
}

建议?

1 个答案:

答案 0 :(得分:0)

解决方案是

.container {
    width: 300px;
    height: 800x;
    border: 1px dotted;
    border-color: red;
}
.img {
    width: 100%;
    height: 100%;
}

谢谢Coh3n。