Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to implement Scroll Bar in bootstrap

2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the relevant knowledge of "bootstrap how to realize scroll bar". In the operation process of actual cases, many people will encounter such difficulties. Next, let Xiaobian lead you to learn how to deal with these situations! I hope you can read carefully and learn something!

Implementation methods: 1. Use "" typesetting class to achieve scroll bar;2. Use "" to achieve scroll bar.

Operating environment of this tutorial: Windows 10 system, bootstrap3.3.7 version, DELL G3 computer

Bootstrap how to achieve scroll bar

One: Add bootstrap style Add scroll bar

In fact, just add pre-scrollable to the class attribute of the relevant module.

For example, add pre-scrollable to:

II: Add scroll bar by setting overflow

Remember width and height must be set oh, otherwise not into, but in not exceed, there will be the following scroll bar, so not the best choice.

Remember width and height must be set oh, otherwise it won't work. This is better, in the width and height do not exceed, just a line.

Three: Directly specify the overflow attribute as auto for div, but you must specify the height of div, as follows:

If a horizontal scroll bar appears: overflow-x:auto

The vertical scroll bar is: overflow-y:auto

If the div is contained in another object such as td, the position can be set to relative: position:relative

Three: Hide the scroll bar

{overflow: hidden ! important;} or {overflow-x: hidden; overflow-y: hidden;} to hide the scroll bar for the x or y axis, respectively

"bootstrap how to implement scroll bar" content is introduced here, thank you for reading. If you want to know more about industry-related knowledge, you can pay attention to the website. Xiaobian will output more high-quality 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: 253

*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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report