【发布时间】:2016-08-11 10:47:27
【问题描述】:
我有一个基本的静态 S.P.A.在笔记本电脑上开发时,我已经按照自己想要的方式设计了样式。当我在移动视口上测试并向上或向下滚动图像/内容调整大小时。我相信这是内置在 chrome 移动浏览器中的,但我想知道是否有办法禁用或围绕它设置样式?一些内容部分使用完整的背景图像,顶部覆盖有文本。当用户滚动并且图像调整大小时,它将内容推送到下一部分而不是有一个干净的结束点。我知道这是可能的,因为我一直使用没有这个问题的移动页面。我只是不知道该怎么做。
.landingImage {
width: 100vw;
height: 100vh;
background-image: url('https://upload.wikimedia.org/wikipedia/commons/6/6f/Black_gram.jpg');
background-position: right;
background-size: cover;
margin-left: auto;
margin-right: auto ;
}
.titleContainer {
position: absolute;
width: 85vw;
height: 75vh;
margin: auto;
top: 0;
bottom: 0;
left: 0;
right: 0;
border: 2px solid white;
font-family: 'Open Sans Condensed', sans-serif;
font-size: 16vw;
color: white;
text-shadow: 1px 1px black;
}
.titleText {
margin-top: 10px;
margin-left: 10px;
}
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<div class="landingImage">
<div class="titleContainer">
<h1 class="titleText">SHIFT<br>WORKS<br>BICYCLE<br>OPERATIONS</h1>
</div>
</div>
【问题讨论】:
-
@MoatazZaitoun 我被告知这意味着单页应用程序。虽然在这种情况下它实际上只是一个静态页面。
标签: html css google-chrome mobile responsive-design