In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces "css how to prohibit the left and right scroll bars of the page". In daily operation, I believe many people have doubts about how to prohibit the left and right scroll bars of the page in css. Xiaobian consulted all kinds of information and sorted out simple and easy to use operation methods. I hope to answer your doubts about "css how to prohibit the left and right scroll bars of the page". Next, please follow the small series to learn together!
In CSS, you can use the "overflow-x" attribute to prohibit the left and right scroll bars of the page. When the value of this attribute is "hidden," you can hide the content of elements beyond the left and right edges, and then prohibit the display of the left and right scroll bars of the page; the syntax is "body{overflow-x:hidden;}."
Operating environment of this tutorial: Windows 7 system, CSS3 && HTML5 version, Dell G3 computer.
CSS How to disable left and right scroll bars on a page
We can set the content beyond the left and right width of the page to hide through the overflow-x attribute, so that the page does not appear left and right scroll bars.
Examples are as follows:
Document body{ overflow-x:hidden; } aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
If the overflow-x:hidden; style is not added to the body element, the output is as follows:
The output of the above example is as follows:
At this point, on the "css how to prohibit the left and right scroll bars of the page" learning is over, I hope to solve everyone's doubts. Theory and practice can better match to help everyone learn, go and try it! If you want to continue learning more relevant knowledge, please continue to pay attention to the website, Xiaobian will continue to strive to bring more practical articles for everyone!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.