How to hide the scroll bar in html

藏色散人
Release: 2023-01-04 09:34:04
Original
11031 people have browsed it

htmlHow to hide the scroll bar: First create an HTML sample file; then set the content area in the body, and put a p outside the content area; finally set the style of p to "overflow:hidden" that is Can.

How to hide the scroll bar in html

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

HTML hides the scroll bar and has a scrolling effect

1. Problem description, see the picture below.

When no scroll bar appears, the width of the header and the content area are equal, but there is too much content in the content area, so the scrolling effect must be retained without the scroll bar appearing. .

2. Solution

Put a p in the outer layer of the content area, set the overflow:hidden style of p, and set the width of the content area to "100% 20px";

头部

哈哈哈

哈哈哈

哈哈哈

哈哈哈

哈哈哈

哈哈哈

哈哈哈

哈哈哈

哈哈哈

哈哈哈

哈哈哈

哈哈哈

哈哈哈

哈哈哈

Copy after login

Recommended study: "HTML Video Tutorial"

The above is the detailed content of How to hide the scroll bar in html. 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
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!