您现在的位置是:网站首页>前端技术>HTML5教程HTML5教程
html5中overflow是什么意思
神夜2021-06-09 10:31:18【HTML5教程】2991人已围观文章来源:PHP中文网
简介在html5中,overflow的意思是溢出,该属性规定如何处理不符合元素框的内容,语法“对象.style.overflow=visible|hidden|scroll|auto”。
在html5中,overflow的意思是溢出,该属性规定如何处理不符合元素框的内容,语法“对象.style.overflow=visible|hidden|scroll|auto”。
本教程操作环境:windows7系统、CSS3&&HTML5版、Dell G3电脑。
意思:HTML溢出;
overflow 属性规定如何处理如何处理不符合元素框的内容。
语法:
Object.style.overflow=visible|hidden|scroll|auto
属性值:
实例
本例使用 overflow 来显示溢出元素框的内容:
<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是什么意思的详细内容,更多请关注php中文网其它相关文章!
声明:本文原创发布php中文网,转载请注明出处,感谢您的尊重!如有疑问,请联系admin@php.cn处理
上一篇:怎么下载Html页面
下一篇:html5的开发工具有哪些
本栏推荐
猜你喜欢
站点信息
- 建站时间:2017-10-24
- 网站程序:Hsycms 3.0
- 文章统计:511条
- 微信公众号:扫描二维码,关注我们