Here's my code, please open in chrome devtool and open mobile simulator:
* {
padding: 0;
margin: 0;
}
body,
html {
height: 100%;
width: 100%;
}
#app {
height: 100%;
background-color: lightcyan;
}
#wrapper {
overflow: auto;
background-color: lightblue;
}
div {
font-size: 24px;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=750,maximum-scale=1.2,user-scalable=no">
<title>Title</title>
</head>
<body>
<div id="app">
<div>Test font sizeTest font size</div>
<div>Test font sizeTest font size</div>
<div>Test font sizeTest font size</div>
<div>Test font sizeTest font size</div>
<div>Test font sizeTest font size</div>
<div id="wrapper">
<div>Test font sizeTest font size</div>
<div>Test font sizeTest font size</div>
<div>Test font sizeTest font size</div>
<div>Test font sizeTest font size</div>
<div>Test font sizeTest font size</div>
</div>
</div>
</body>
</html>
One font size in one page have two appearance, it's so strange. There some ways I find can make font size behave the same:
- remove style
height:100%
from#app
- delete some div element(e.g. leave two in div in
app
and two div inwrapper
) - change
width
attribute ofviewport
todevice-width
- remove style
overflow
on#wrapper
But those ways can't explain my question.