Home  >  Article  >  Web Front-end  >  What does overflow mean in html5

What does overflow mean in html5

醉折花枝作酒筹
醉折花枝作酒筹Original
2021-06-03 14:07:4316805browse

In HTML5, overflow means overflow. This attribute specifies how to handle content that does not fit the element box. The syntax is "object.style.overflow=visible|hidden|scroll|auto".

What does overflow mean in html5

The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.

Meaning: HTML overflow;

The overflow attribute specifies how to handle content that does not fit the element box.

Syntax:

Object.style.overflow=visible|hidden|scroll|auto

Attribute value:

What does overflow mean in html5

Example

This example uses overflow to display the overflow element box Content:

<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>

Effect:

What does overflow mean in html5

Recommended learning: html video tutorial

The above is the detailed content of What does overflow mean in html5. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn