2.4 Overflow
Overflow:hidden; 会将出了盒子的内容裁掉
Overflow:auto;
当内容出了盒子之外,会自动生成滚动条,如果没有内容之外,则不生成滚动条。
Overflow:scroll;
不管内容有没有出盒子,都会生成滚动条。
overflow: visible;
内容出了盒子会显示,不生成滚动条。

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Document</title>
<style type="text/css">
.box {
width: 300px;
height: 300px;
background: #eee;
overflow: auto;
}
</style>
</head>
<body>
<div class="box">
<img src="1.jpg" alt="" />
<p>14期威武</p>
<p>14期威武</p>
<p>14期威武</p>
<p>14期威武</p>
<p>14期威武</p>
<p>14期威武</p>
<p>14期威武</p>
<p>14期威武</p>
<p>14期威武</p>
<p>14期威武</p>
<p>14期威武</p>
<p>14期威武</p>
<p>14期威武</p>
<p>14期威武</p>
<p>14期威武</p>
<p>14期威武</p>
<p>14期威武</p>
<p>14期威武</p>
</div>
</body>
</html>
效果如下

网友评论