.."."/> ..".">

Home  >  Article  >  Web Front-end  >  How to disable scrolling of html page

How to disable scrolling of html page

WBOY
WBOYOriginal
2021-11-09 14:53:0511662browse

In HTML, you can disable page scrolling by setting the value of the style attribute of the body element to "overflow:hidden". The specific syntax is "

..< ;/body>".

How to disable scrolling of html page

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

htmlHow to prohibit page scrolling:

1. First create a new index.html page to simulate the demonstration

How to disable scrolling of html page

2. Pre-prepare a large amount of data in the body to facilitate the display of scroll bars

How to disable scrolling of html page

3. Open it in the browser to see the vertical Scroll bar

How to disable scrolling of html page

4. Add a style control style="overflow:hidden" in the body of the html page, and save it after adding

How to disable scrolling of html page

5. Refresh the previously displayed interface in the browser

How to disable scrolling of html page

6. After refreshing, you can see that the scroll bar is no longer displayed and the interface is prohibited from scrolling.

How to disable scrolling of html pageFor more programming-related knowledge, please visit: Programming Video! !

The above is the detailed content of How to disable scrolling of html page. 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