Home > Web Front-end > H5 Tutorial > body text

What does overflow mean in html5

醉折花枝作酒筹
Release: 2023-01-06 11:16:20
Original
16810 people have browsed it

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
Copy after login

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>
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!