0
flexbox 기반 레이아웃을 사용할 때 스크롤 기능이 다르다는 것을 알아 냈습니다. position: fixed
바닥 글과 비교했습니다. 고정 바닥 글은 훨씬 부드럽고 스크롤바를 보여줍니다. Flexbox는 전혀 매끄럽지 않으며 스크롤바를 표시하지 않습니다. 나는 내 레이아웃을 위해 flexbox를 사용하는 것을 선호하지만 더 좋은 스크롤을 원한다. 플렉스 박스로 어떤 방법으로 그것을 달성 할 수 있습니까?IOS에서 Flexbox가 다르게 스크롤됩니다.
<html>
<head>
<meta name=viewport content="width=device-width,initial-scale=1">
</head>
<body>
<div id='main'>
...lots of content so it would scroll
</div>
<nav class="footer">footer</nav>
</body>
</html>
인 flexbox 방법 :
html, body {
height: 100%;
margin: 0;
padding: 0;
}
body {
-webkit-flex-direction: column;
flex-direction: column;
display: flex;
}
#main {
-webkit-flex: 1 1 auto;
overflow-y: auto;
min-height: 0px;
}
.footer {
height: 72px;
min-height: 72px;
background-color: blue;
}
내가 IOS에서 테스트하고 있습니다
10 아이폰 7. 크롬 및 사파리
HTML을 모두에서 발생
고정 바닥 글 방법 :
html, body {
height: 100%;
margin: 0;
padding: 0;
}
#main {
padding-bottom: 72px;
}
.footer {
position: fixed;
bottom: 0;
height: 72px;
min-height: 72px;
width: 100%;
background-color: blue;
}