感谢您的支持,我会继续努力的!
打开微信扫一扫,即可进行扫码打赏哦
点我查看本站打赏源码!
Powered by RUNCODEX.COM,学的不仅是技术,更是梦想!!!
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>文档标题</title>
</head>
<body>
<h1>overflow 属性</h1>
<div>1、默认的overflow —— visible是默认值。</div>
<br/>
<div class="visible">2、overflow: visible; —— 内容超出时会呈现在元素框之外。</div>
<div class="hidden">3、overflow: hidden; —— 超出的内容不可见。</div>
<div class="scroll">4、overflow: scroll; —— 总是显示滚动条。</div>
<div class="auto">5、overflow: auto; —— 滚动条在需要的时候才出现。</div>
<div class="inherit">6、overflow: inherit; ——继承父元素的overflow值。</div>
</body>
</html>
输入 JavaScript 代码……
xxxxxxxxxx
div {
width: 180px;
height: 30px;
border: solid 2px red;
}
.visible {
overflow: visible;
.hidden {
overflow: hidden;
.scroll {
overflow: scroll;
.auto {
overflow: auto;
.inherit {
overflow: inherit;