引导程序中“col

您所在的位置:网站首页 84009165其中的4表示什么 引导程序中“col

引导程序中“col

2024-07-12 16:13| 来源: 网络整理| 查看: 265

本文翻译自:Meaning of numbers in “col-md-4”,“ col-xs-1”, “col-lg-2” in Bootstrap

I am confused with the grid system in the new Bootstrap, particularly these classes: 我对新Bootstrap中的网格系统感到困惑,尤其是这些类:

col-lg-* col-md-* col-xs-*

(where * represents some number). (其中*代表一些数字)。

Can anyone please explain the following: 任何人都可以解释以下内容:

How that number is aligning the grids? 这个数字是 如何 对齐网格的? How to use these numbers? 如何 使用这些数字? What they actually represent? 他们究竟代表什么呢? #1楼

参考:https://stackoom.com/question/1dRHS/引导程序中-col-md-col-xs-col-lg-中数字的含义

#2楼

Applies to Bootstrap 3 only. 仅适用于Bootstrap 3。

Ignoring the letters (x s , sm , md , lg ) for now , I'll start with just the numbers... 忽略字母(X S,SM,MD,LG) 现在 ,我只用数字开始...

the numbers (1-12) represent a portion of the total width of any div 数字(1-12)代表任何div的总宽度的一部分 all divs are divided into 12 columns 所有div分为12列 so, col-*-6 spans 6 of 12 columns (half the width), col-*-12 spans 12 of 12 columns (the entire width), etc 所以, col-*-6跨越12列中的6列(宽度的一半), col-*-12跨越12列中的12列(整个宽度),等等

So, if you want two equal columns to span a div, write 所以,如果你想要两个相等的列来跨越div,写一下

Column 1 Column 2

Or, if you want three unequal columns to span that same width, you could write: 或者,如果您希望三个不相等的列跨越相同的宽度,您可以编写:

Column 1 Column 2 Co


【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3