Use bootstrap responsive layouts--Scroll across tabs options in the phone screen

Source: Internet
Author: User

The navigation bar to the small screen, our approach is to hide as a button. However, the tab portion of tabs, our approach is to add a horizontal scroll bar. However, adding a horizontal scrollbar needs to solve a problem, that is, the width of the problem, if not set width, he will be based on the screen size adaptive, so that there will be a line down the situation, there will be no horizontal scroll bar.

1, dynamic to the UL set width

Traverse the LI element to find out the width of all Li, so that you can dynamically set the width of the UL.

2, to the UL parent box set Overflow-x:scroll;

Use bootstrap responsive layouts--Scroll across tabs options in the phone screen

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.