Home > Web Front-end > Front-end Q&A > How to set html not to display scroll bars

How to set html not to display scroll bars

藏色散人
Release: 2023-01-05 16:12:10
Original
7025 people have browsed it

How to set scroll bars not to be displayed in html: first create a new HTML code page; then create a div on the html code page; then set the scroll-box and scroll class styles; finally set a height and height for the scroll-box The style can be hidden after the content exceeds the limit.

How to set html not to display scroll bars

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

First open the front-end development tool hbuilder, create a new HTML code page, create a parent

and a child
on the html code page, and add a class to these two divs respectively: scroll-box, scroll.

How to set html not to display scroll bars

Then add content to the child div. In order to make the scroll bar possible, add as much content as possible.

Then set the scroll-box and scroll class styles. Set a style for scroll-box that hides the height and content after the content exceeds. For scroll, set the scroll bar to be displayed after the content exceeds. The height is 100% and the width is 100% plus the width of the scroll bar.

How to set html not to display scroll bars

Save the html code and open it with a browser. You will find that the scroll bar is no longer displayed, but the page content can still be scrolled.

How to set html not to display scroll bars

[Recommended learning: HTML video tutorial]

The above is the detailed content of How to set html not to display scroll bars. 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