<!DOCTYPE html>
<html>
<head>
<style type="text/css">
html {
width:100%;
height:100%;
}
body {
overflow: hidden;
height: 300px;
border: 6px solid red;
}
</style>
</head>
<body>
<h1>haha</h1><h1>haha</h1><h1>haha</h1><h1>haha</h1><h1>haha</h1><h1>haha</h1><h1>haha</h1>
<h1>haha</h1><h1>haha</h1><h1>haha</h1><h1>haha</h1><h1>haha</h1><h1>haha</h1><h1>haha</h1>
<h1>haha</h1><h1>haha</h1><h1>haha</h1><h1>haha</h1><h1>haha</h1><h1>haha</h1><h1>haha</h1>
</body>
</html>
This is my code. However, the "haha" inside the body overflow outside of body, regardless of the overflow:hidden property of body, and I don't know why.
Browser:Firefox 34.0.5