The layout of the mobile end, the width is tripled, why the height is also tripled?

question:

when doing Mobile layout , you want to achieve a bottom div, with a horizontal width that is three times the width of the page viewport in the landscape state. Now, after expanding the width, the height is also increased by three times. Why is that?

Code

html
<body>
    <div class="wrap"></div>
</body>
html, body {
    width: 100%;
    height: 100%;
}

.wrap {
    width: 300%;
    height: 100%;
    background: rgba(222, 123, 32, 0.4);
}

can solve the problem from the max-height attribute
set the maximum height to an absolute value instead of a percentage unit


No, your code is full?


Does

have content elements that cause this? Consider using units such as vw and vh

.
100%
    300%
        900%
The code posted by

will not cause the height to triple. In addition, percentage is not recommended for mobile devices. Personally, I think rem is better as a unit

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b33440-2be62.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b33440-2be62.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?