我的网页无法在移动设备上滚动。如果您在桌面上调整窗口大小,则可以使用它,但是如果您在实际的移动设备上查看页面,则无法滚动。这只会导致页面内容的一半可见。
我尝试将身高设置为100%。
* {margin: 0; padding: 0, box-sizing: border-box;}
.news-module {
width: 100%;
float: left;
height: auto;
}
.news-sub-module {
width: 70vw;
height: auto;
margin: 2vw 5vw 3vw 5vw;
padding: 4vw;
float: left;
color: black;
cursor: pointer;
}
.news-sub-module:nth-child(even) {
float: right;
}
.header-style-one {
width: 100%;
}
.news-more {
float: left;
margin: 1vw 0 0 0;
}
<div class="news-module">
<div class="news-sub-module">
<div class="news-date">
06.12.2019 </div>
<div class="header-style-one">
<a href="#">Meet Italy’s Most Passionate Tomato Farmer</a>
</div>
<div class="news-description">
<a href="#">August in Italy: businesses are closed, cities have emptied out, towns are deserted—everyone is at the beach. Everyone, that is, except for tomato farmers in the Campania region, Italy’s tomato capital. Here, in late summer, trucks loaded with the vibrant, just-harvested fruits crowd tiny, one-lane streets...</a>
</div>
<div class="news-more">
<a href="#">→ Read More</a>
</div>
</div>
<div class="news-sub-module">
<div class="news-date">
06.11.2019</div>
<div class="header-style-one">
<a href="#">Q+A with Winemaker Steve Matthiasson</a>
</div>
<div class="news-description">
<a href="#">Steve Matthiasson was perhaps the most in-demand viticulturist in Napa when he and his wife, Jill, decided to start their own wine label. We caught up with Steve in the middle of this year’s grape harvest to talk about one of his favorite subjects: gathering friends to eat, drink and be merry...</a>
</div>
<div class="news-more">
<a href="#">→ Read More</a>
</div>
</div>
<div class="news-sub-module">
<div class="news-date">
05.15.2019 </div>
<div class="header-style-one">
<a href="#">Spring’s Most Sensitive, and Bountiful, Vegetable</a>
</div>
<div class="news-description">
<a href="#">“People say gambling came to New Jersey with the casinos,” laughs Tom Sheppard of Sheppard Farms in Cumberland County, New Jersey. “But gambling came with the first farmers. Out there in the field, mother nature can do all kinds of things to you.”...</a>
</div>
<div class="news-more">
<a href="#">→ Read More</a>
</div>
</div>
<div class="news-sub-module">
<div class="news-date">
05.10.2019 </div>
<div class="header-style-one">
<a href="#">Can an American Parmesan Dethrone the King of Cheeses?</a>
</div>
<div class="news-description">
<a href="#">Parmesan cheese is at the heart of Italian cuisine, and the greatest of all of Parmesans is Parmigiano Reggiano. So when you’re looking for a cheese to grate over a saucy tangle of pasta, there is no substitute. The Schuman family believes they can change all that...</a>
</div>
<div class="news-more">
<a href="#">→ Read More</a>
</div>
</div>
</div>
我希望能够在移动设备上滚动而不是切断内容。