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

How to hide scroll bars and remove scroll bars in HTML

不言
不言Original
2018-06-05 13:53:473725browse

This article mainly introduces relevant information on methods of hiding scroll bars and removing scroll bars in HTML. It is very good and has reference value. Friends in need can refer to it

1. html tag Add attributes

XML/HTML CodeCopy the content to the clipboard

<html lang="en" class="no-ie" style="overflow:hidden;">

2.Add the following code to the body

XML/HTML CodeCopy content to clipboard

<style type="text/css">
html{     
    overflow-x: hidden;     
    overflow-y: hidden;     
}     
</style>

How to remove scroll bars from html pages

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

Write a css directly in the html

XML/HTML CodeCopy the content to the clipboard

<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 bars

Related recommendations:

htmlTable cell content exceeds The ellipsis effect is displayed

The above is the detailed content of How to hide scroll bars and 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