Home  >  Article  >  Web Front-end  >  How to hide scroll bars or remove scroll bars in HTML

How to hide scroll bars or remove scroll bars in HTML

小云云
小云云Original
2018-01-26 11:23:0110331browse

Scroll bars can exist or not. This article mainly introduces relevant information on methods of hiding scroll bars and removing scroll bars in HTML. Let’s learn how to hide scroll bars or remove scroll bars in HTML.

1. Add attributes to the html tag

XML/HTML Code copy content to the clipboard

  1. dae39663ba557de67fe20aadb05b2b9b

2.Add the following code to the body

  1. 46d5fe1c7617e3914f214aaf043f4ccf
    html{     
        overflow-x: hidden;     
        overflow-y: hidden;     
    }     
    531ac245ce3e4fe3d50054a55f265927

How to remove scroll bars from html pages

In order to prevent the previous css file from overwriting the style of the body

Write a css directly in the html

  1. <span style="font-size:24px;"><style type="text/css">
    body{     
        overflow-x: hidden;     
        overflow-y: hidden;     
    }     
    </style></span>

This way there will be no scroll bar

Related recommendations:

About the method of operating scroll bars in HTML

Determine when the scroll bar slides to the bottom and trigger an event instance sharing

jQuery response to the scroll bar event function example

The above is the detailed content of How to hide scroll bars or remove scroll bars 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
Previous article:HTML form tag usageNext article:HTML form tag usage