현재 프로젝트에 HTML5 Boilerplate + Normalize.css를 사용하려고하는데 다음 문제가 발생했습니다.CSS - 내 HTML과 BODY 사이의 흰색 갭
내 HTML 태그와 내 BODY 태그 사이에 간격이있는 것으로 보입니다. 나는 그 원인을 알아 내려고 노력했지만 많은 시도 후에 실패했습니다.
나는 여기 저기에 뭔가를 놓쳤을 것입니다. 사전에 http://jsfiddle.net/C7gbC/
감사 : 여기
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Ridanis | Web Design & Web Development</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="css/normalize.min.css">
<link rel="stylesheet" href="css/main.css">
<script src="js/vendor/modernizr-2.6.2-respond-1.1.0.min.js"></script>
</head>
<body>
<!--[if lt IE 7]>
<p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
<![endif]-->
<!-- Wrapper/Start -->
<div class="wrapper">
<h1>Hello World!</h1>
</div>
<!-- Wrapper/End -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.9.1.min.js"><\/script>')</script>
<script src="js/main.js"></script>
</body>
</html>
는 바이올린입니다.
다른 사람이 브라우저를 사용하는 경우 Internet Explorer가 아니기 때문에이 브라우저에 HTML 문이 없을 가능성이 높습니다. 페이지는 어쨌든 작동해야하지만 더 이상 유효한 HTML이 아닙니다. –
기술적 인 배경 : 이것을 "인접 마진"이라고합니다. http://www.w3.org/TR/CSS21/box.html#collapsing-margins – CBroe
@CBroe : 정확히 말하면 현상을 접기 여백이라고합니다. . 인접 마진은 특정 상황에서 접을 수 없습니다. – BoltClock