How to disable scrolling of html page

WBOY
Release: 2021-11-09 14:53:05
Original
11481 people have browsed it

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="max-width:90%" 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!

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 [email protected]
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!