How to cancel the scroll bar in html

藏色散人
Release: 2023-01-03 09:31:38
Original
12653 people have browsed it

htmlHow to cancel the scroll bar: 1. Remove the horizontal scroll bar through "overflow-x: hidden"; 2. Remove the vertical scroll bar through "overflow-y: hidden"; 3. Remove the vertical scroll bar through "overflow: hidden" cancels all scroll bars.

How to cancel the scroll bar in html

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

#How to remove the scroll bar on the right side of the browser in html

 表示去掉水平滚动条。  表示去掉竖直滚动条。  表示隐藏横向滚动条,显示纵向滚动条。 或者是 表示全部隐藏
Copy after login

If it is a frame page and it still cannot be removed using the above method, you can consider the following methods:

 如果想隐藏水平滚动条。  如果想隐藏垂直滚动条。 body{style="overflow-y : auto;height"} body浏览器自带的默认值。
Copy after login

Let’s talk about the attribute code of the scroll bar first:

overflow-y : visible | auto | hidden | scroll
Copy after login

visible: Does not cut content or add scroll bars.

auto: Cut content and add scrollbars when needed.

hidden: Do not display content that exceeds the height of the object. This attribute will not be introduced here. If you like it, you can try it yourself.

scroll: Always display a vertical scroll bar.

Let’s talk about the beautification of the scroll bar:

SCROLLBAR-FACE-COLOR: 这是颜色代码,也可以自定义颜色。 SCROLLBAR-HIGHLIGHT-COLOR: 这是颜色代码,也可以自定义颜色。 SCROLLBAR-SHADOW-COLOR: 这是颜色代码,也可以自定义颜色。 SCROLLBAR-3DLIGHT-COLOR: 这是颜色代码,也可以自定义颜色。 SCROLLBAR-ARROW-COLOR: 这是颜色代码,也可以自定义颜色。 SCROLLBAR-TRACK-COLOR: 这是颜色代码,也可以自定义颜色。 SCROLLBAR-DARKSHADOW-COLOR: 这是颜色代码,也可以自定义颜色。 scrollbar-base-color:其实就是上面7个属性的总合,前面的7个属性都可以不用设置了,滚动条会自动帮你设定
Copy after login

, but this setting will be automatically set based on the color of the scrollbar-base-color you set.

Note: If scrollbar-base-color is set, do not set the other seven attributes. If the other seven attributes are set, do not set scrollbar-base-

color, otherwise There may be conflicts between them, and some effects may not work.

Recommended study: "HTML Video Tutorial"

The above is the detailed content of How to cancel 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!