本文摘自PHP中文网,作者醉折花枝作酒筹,侵删。
在html5中,overflow的意思是溢出,该属性规定如何处理不符合元素框的内容,语法“对象.style.overflow=visible|hidden|scroll|auto”。

本教程操作环境:windows7系统、CSS3&&HTML5版、Dell G3电脑。
意思:HTML溢出;
overflow 属性规定如何处理如何处理不符合元素框的内容。
语法:
1 | Object.style.overflow= visible | hidden | scroll | auto
|
属性值:

实例
本例使用 overflow 来显示溢出元素框的内容:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | < html >
< head >
< style type = "text/css" >
div {
border: thin solid green;
width: 100px;
height: 100px;
}
</ style >
< script type = "text/javascript" >
function hideOverflow() {
document.getElementById("div1").style.overflow = "hidden";
}
</ script >
</ head >
< body >
< div id = "div1" >
This is some text. This is some text. This is some text. This is some
text. This is some text. This is some text. This is some text. This is
some text. This is some text.
</ div >
< br />
< input type = "button" onclick = "hideOverflow()" value = "Hide overflow" />
</ body >
</ html >
|
效果:

推荐学习:html视频教程
以上就是html5中overflow是什么意思的详细内容,更多文章请关注木庄网络博客!
相关阅读 >>
HTML5比flash好在哪
http协议发展过程一览
h5如何做出碎片式的图片切换
HTML5对手机页面长按会粘贴复制禁用的解决方法
详解HTML5中localstorage存储json数据并读取json数据的实现方法
HTML5多媒体audio和video详细介绍(二)
使用h5实现react拖拽排序组件的方法(附代码)
前端必看h5 meta小结
h5的各种错误用法总结
利用HTML5 实现3d 网络拓扑树(图文详解)
更多相关阅读请进入《HTML5》频道 >>
人民邮电出版社
本书对 Vue.js 3 技术细节的分析非常可靠,对于需要深入理解 Vue.js 3 的用户会有很大的帮助。——尤雨溪,Vue.js作者
转载请注明出处:木庄网络博客 » html5中overflow是什么意思