Home >Web Front-end >Front-end Q&A >How to cancel scrolling in html

How to cancel scrolling in html

藏色散人
藏色散人Original
2021-06-08 10:28:062179browse

htmlHow to cancel scrolling: 1. Cancel the vertical scroll bar through "overflow-y:hidden"; 2. Cancel the horizontal scroll bar through "overflow-x:hidden".

How to cancel scrolling in html

The operating environment of this article: windows7 system, HTML5 version, DELL G3 computer

How to cancel scrolling in html?

html page to remove scroll bars

Sometimes it is particularly necessary. Some web pages need to remove horizontal scroll bars and vertical scroll bars. How to remove them? It is very simple. Look at the code:

Let there be no vertical bars:

<body style=`overflow:-Scroll;overflow-y:hidden` > 
</body>

Let there be no horizontal bars:

<body style=`overflow:-Scroll;overflow-x:hidden` > 
</body>

The scroll bar at the bottom of Firefox is not displayed:

html { overflow:-moz-scrollbars-vertical; }

Recommended learning: "HTML video tutorial"

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