머리와 꼬리가 중간에 스스로 적응하는 배치를 고정시킨다
1384 단어 스스로 적응하다
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<title>Document</title>
</head>
<body>
<div class="con">
<div class="top"></div>
<div class="md">
ssssdfs
</div>
<div class="bottom"></div>
</div>
<style>
*{margin:0; padding:0;}
html,body,.con{height:100%;width:100%;height:100%;width:100%;}
div{position:absolute;}
.top,.bottom{width:100%;height:100px;z-index:5;}
.top{background:red;top:0;}
.bottom{background:black;bottom:0;}
.md{
width:100%;
background:#a7fad7;
overflow:auto;
top:100px;
bottom:100px;
position:absolute;
_height:100%;
_padding:100px 0;
_top:0;
}
</style>
</body>
</html>
관련 링크:
http://www.cnblogs.com/ckmouse/archive/2012/02/14/2351043.html
http://www.cnblogs.com/bydclouds/archive/2014/09/24/3991571.html
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
자층div 부동으로 인해 부층이 고도에 적응하지 못하는 해결 방법텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.