私はいくつかのCSSとHTMLコードで奇妙なことがあります。次のコードは、ブラウザのchrome、firefoxで使用するとうまく動作しますが、開発者のツールを使用して、モバイルビューでは最小の高さ(100%)を理解できません。適用されない?スクリーンショットが含まれています。だから通常のブラウザでうまくいくのはなぜですか?ありがとう!縦の高さの幅CSSのhtmlいくつかの奇妙なもの
*,
*::before,
*::after {
box-sizing: inherit;
}
* {
position: relative;
}
a,
body,
footer,
header,
h1,
h2,
html,
img,
li,
p,
section,
span,
sup,
ul {
background: transparent;
border: 0;
font-size: 100%;
margin: 0;
outline: 0;
padding: 0;
vertical-align: baseline;
}
html {
box-sizing: border-box;
height: 100%;
overflow-x: scroll;
overflow-y: hidden;
width: 210%;
}
body {
background: red;
color: #FFFFFF;
height: 100%;
margin: auto;
overflow: hidden;
width: 210%;
}
section {
display: block;
float: left;
height: 100%;
width: 100%;
}
.test {
float: left;
min-height: 100%;
overflow: hidden;
width: 20%;
}
<body>
<section class="test" style="background-image: url('https://wallpapers.wallhaven.cc/wallpapers/full/wallhaven-95348.jpg');">test</section>
<section class="test" style="background-image: url('https://wallpapers.wallhaven.cc/wallpapers/full/wallhaven-95348.jpg');">test</section>
<section class="test" style="background-image: url('https://wallpapers.wallhaven.cc/wallpapers/full/wallhaven-95348.jpg');">test</section>
<section class="test" style="background-image: url('https://wallpapers.wallhaven.cc/wallpapers/full/wallhaven-95348.jpg');">test</section>
<section class="test" style="background-image: url('https://wallpapers.wallhaven.cc/wallpapers/full/wallhaven-95348.jpg');">test</section>
</body>
Chromeから開発ツールのスクリーンショット:それも開発ツールで、100%の高さにすることができますどのように
?
THX!
私は、開発ツールが100%から100%ではなく71%にウィンドウを離れるので、私はそれを考えています。 – Keith
あなたは 'body'タグを開く前に' head'タグを閉じませんでした。(第2の開始タグがあります) – Johannes
この問題は修正されていません:Xと100%のウィンドウ。 :\ – derder