index.html
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="utf-8">
<title>CSS盒模型[上]</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div>我是HTML5,我是HTML5,我是HTML5,我是HTML5,我是HTML5,我是HTML5,我是HTML5,我是HTML5,我是HTML5,我是HTML5,我是HTML5,我是HTML5,我是HTML5,我是HTML5,我是HTML5,我是HTML5,我是HTML5,我是HTML5,我是HTML5,</div>
</body>
</html>
style.css
@charset "utf-8";
/*body {
border: 1px solid red;
}*/
div {
background: silver;
width: 200px;
height: 200px;
/* min-width: 100px;
min-height: 100px;
max-width: 300px;
max-height: 300px;*/
/*width: 60%;*/
/*width: 50%;*/
/* width: auto;
height: auto;*/
/* padding-top: 10px;
padding-bottom: 10px;
padding-left: 10px;
padding-right: 10px;*/
/*padding: 10px;*/
/*padding: 10px 20px;*/
/*padding: 10px 20px 30px;*/
/*padding: 10px 20px 30px 40px;*/
/* margin-top: 50px;
margin-left: 50px;*/
/*overflow-y: visible;*/
/*overflow-y: auto;*/
/*overflow-y: hidden;*/
overflow-y: scroll;
}