首页前端开发HTMLhtml5中overflow是什么意思

html5中overflow是什么意思

时间2024-01-23 21:52:35发布访客分类HTML浏览446
导读:收集整理的这篇文章主要介绍了html5中overflow是什么意思,觉得挺不错的,现在分享给大家,也给大家做个参考。在htML5中,overflow的意思是溢出,该属性规定如何处理不符合元素框的内容,语法“对象.style.overflow...
收集整理的这篇文章主要介绍了html5中overflow是什么意思,觉得挺不错的,现在分享给大家,也给大家做个参考。

在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是什么意思的详细内容,更多请关注其它相关文章!

声明:本文内容由网友自发贡献,本站不承担相应法律责任。对本内容有异议或投诉,请联系2913721942#qq.com核实处理,我们将尽快回复您,谢谢合作!

html5

若转载请注明出处: html5中overflow是什么意思
本文地址: https://pptw.com/jishu/584684.html
html5是啥 html如何定义错误提示

游客 回复需填写必要信息