Bootstrap Col-XS: Mastering Bootstrap Extra Small Grid - BitDegree
Có thể bạn quan tâm
By now, you are familiar with using a grid system and utility classes. Therefore, our next tutorial should seem easy: we will introduce responsive classes that you can use in your grids.
Bootstrap Col-XS classes are applied in the cases of devices with tiny screens - no more than 576 pixels in width. In most cases, it is a rather simple phone.
Contents
- 1. Bootstrap Col-XS: Main Tips
- 2. XS Grid
- 3. Auto Layout
- 4. Bootstrap Col-XS: Summary
Bootstrap Col-XS: Main Tips
- Bootstrap 4 grid system offers a set of responsive classes to specify on what screens a certain layout works.
- The Bootstrap Col-XS (extra small) class applies a grid column class to an element when the screen is narrower than 576px.
- It is created by using Bootstrap col-xs-* in your code.
XS Grid
The Bootstrap extra small (col-xs) column classes apply when the screen is narrower than 576px.
Columns like the ones you see below are created by using the class prefix .col-xs-*:
col-xs-4 col-xs-8Now, here we have an HTML example that creates a simple layout which applies to any screen size and looks like the one displayed above:
Example Copy <div class="container"> <div class="row"> <div class="bg-info col-xs-4"> ... </div> <div class="bg-primary col-xs-8"> ... </div> </div> </div> Try it Live Learn on Udacity Pros- Easy to use with a learn-by-doing approach
- Offers quality content
- Gamified in-browser coding experience
- The price matches the quality
- Suitable for learners ranging from beginner to advanced
- Free certificates of completion
- Focused on data science skills
- Flexible learning timetable
- Simplistic design (no unnecessary information)
- High-quality courses (even the free ones)
- Variety of features
- Nanodegree programs
- Suitable for enterprises
- Paid Certificates of completion
- A wide range of learning programs
- University-level courses
- Easy to navigate
- Verified certificates
- Free learning track available
- University-level courses
- Suitable for enterprises
- Verified certificates of completion
Auto Layout
Using Bootstrap 4 grid system, you can also create auto layouts. They are made by not specifying how many columns a grid column should span (skipping the number for all column containers inside a row container).
When you do this, Bootstrap 4 automatically determines how many columns each column element should span through for all of them to be equal and span through the whole available width together:
Example Copy <div class="row"> <!-- Five 20% wide columns --> <div class="bg-primary col">1</div> <div class="bg-secondary col">2</div> <div class="bg-primary col">3</div> <div class="bg-secondary col">4</div> <div class="bg-primary col">5</div> </div> Try it Live Learn on UdacityBootstrap Col-XS: Summary
- The responsive classes are used in the grid system to specify the size of the screen that a certain layout works on.
- Bootstrap extra small, or Col-XS class applies a grid column class to an element when the user is not using a screen that is wider than 576px.
Từ khóa » Html Css Col-xs
-
Bootstrap Grid Examples - W3Schools
-
CSS · Bootstrap
-
Grid System - Bootstrap
-
Meaning Of Numbers In "col-md-4"," Col-xs-1", "col-lg-2" In Bootstrap
-
Meaning Of Numbers In “col-md-4”,“ Col-xs-1”, “col-lg-2” In Bootstrap
-
What Is The Function Of The Xs Grid Class In Bootstrap ? - GeeksforGeeks
-
Replace Bootstrap Layouts With CSS Grid - The Web Developer Blog
-
Grid System - ACS Design System - American Chemical Society
-
Col Xs Not Working In Bootstrap 4
-
[Solved]: Bootstrap Col-xs-* Not Working - Web Developers Planet
-
Col-xs- Bootstrap 5 Code Example
-
CSS Grid Vs Bootstrap: Which One Is Better For You? - BrowserStack
-
How To Replace Col-xs-* In Bootstrap 4 - W3docs