当前位置:网站首页>bootsrap中的栅格系统
bootsrap中的栅格系统
2022-07-01 03:19:00 【黄钢】
bootsrap中的栅格系统
Bootstrap 提供了一套响应式、移动设备优先的流式栅格系统,随着屏幕或视口(viewport)尺寸的增加,系统会自动分为最多12列。
上面是bootsrap官网上的说明。官网解释了栅格的多种布局方式,但是不够明确
现在我要做这么个布局

很简单的布局,感觉官网上也没讲明白怎么实现,看了一下菜鸟教程,算是搞明白了
bootsrap的栅格系统总共有12格,这个格是横向上的,和纵向无关
实现的思路:
- 上面这个布局A和B占左边3格(或者叫列),中间的E占6格,C和D占右边的3格
- A和B放在同一个class为row的div里,同时,横向上要撑满这个row,也就是说A和B各占这个子布局的12格
- C和D同AB
- 自己根据页面内容,调整各个子布局的高度
代码如下:
<div class="col-lg-3">
<div class="row">
<div class="col-lg-12">
<div class="panel panel-default">
<div class="panel-heading">A</div>
<div class="panel-body">
<div id="m2" style="width: 100%;height:300px;"></div>
</div>
</div>
</div>
<div class="col-lg-12">
<div class="panel panel-default">
<div class="panel-heading">B</div>
<div class="panel-body">
<div id="m1" style="width: 100%;height:300px;"></div>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-6">
<div class="panel panel-default">
<div class="panel-heading">E</div>
<div class="panel-body">
<div id="m3" style="width: 100%;height:692px;overflow: hidden;margin:0"></div>
</div>
</div>
</div>
<div class="col-lg-3">
<div class="row">
<div class="col-lg-12">
<div class="panel panel-default">
<div class="panel-heading">SOC(%)C</div>
<div class="panel-body">
<div id="m4" style="width: 100%;height:300px;"></div>
</div>
</div>
</div>
<div class="col-lg-12">
<div class="panel panel-default">
<div class="panel-heading">D</div>
<div class="panel-body">
<div id="m5" style="width: 100%;height:300px;"></div>
</div>
</div>
</div>
</div>
</div>
理解了这个布局后,其他的栅格布局应该都能做出来
边栏推荐
- How do I use Google Chrome 11's Upload Folder feature in my own code?
- 【伸手党福利】JSONObject转String保留空字段
- Pytorch training deep learning network settings CUDA specified GPU visible
- Filter
- [daily training] 1175 Prime permutation
- Listener listener
- Finally in promise
- Processing of menu buttons on the left and contents on the right of the background system page, and double scrolling appears on the background system page
- 数据库中COMMENT关键字的使用
- [reading notes] copywriting realization -- four golden steps for writing effective copywriting
猜你喜欢

Listener listener

访问阿里云存储的图片URL实现在网页直接预览略缩图而不直接下载

Appium自动化测试基础 — APPium基本原理

还在浪费脑细胞自学吗,这份面试笔记绝对是C站天花板

The preorder traversal of leetcode 144 binary tree and the expansion of leetcode 114 binary tree into a linked list

Filter

Analyze datahub, a new generation metadata platform of 4.7K star
![[us match preparation] complete introduction to word editing formula](/img/e4/5ef19d52cc4ece518e79bf10667ef4.jpg)
[us match preparation] complete introduction to word editing formula
![[小样本分割]论文解读Prior Guided Feature Enrichment Network for Few-Shot Segmentation](/img/b3/887d3fb64acbf3702814d32e2e6414.png)
[小样本分割]论文解读Prior Guided Feature Enrichment Network for Few-Shot Segmentation
![[small sample segmentation] interpretation of the paper: prior guided feature enrichment network for fee shot segmentation](/img/b3/887d3fb64acbf3702814d32e2e6414.png)
[small sample segmentation] interpretation of the paper: prior guided feature enrichment network for fee shot segmentation
随机推荐
Appium自动化测试基础--补充:C/S架构和B/S架构说明
JS日常开发小技巧(持续更新)
IPv4 and IPv6, LAN and WAN, gateway, public IP and private IP, IP address, subnet mask, network segment, network number, host number, network address, host address, and IP segment / number - what does
Include() of array
打包iso文件的话,怎样使用hybrid格式输出?isohybrid:command not found
后台系统页面左边菜单按钮和右边内容的处理,后台系统页面出现双滚动
数据库DDL(Data Definition Language,数据定义语言)知识点
网页不能右键 F12 查看源代码解决方案
Ultimate dolls 2.0 | encapsulation of cloud native delivery
Promise中finally的用法
10、Scanner.next() 无法读取空格/indexOf -1
Database DDL (data definition language) knowledge points
IPv4和IPv6、局域网和广域网、网关、公网IP和私有IP、IP地址、子网掩码、网段、网络号、主机号、网络地址、主机地址以及ip段/数字-如192.168.0.1/24是什么意思?
雪崩问题以及sentinel的使用
5、【WebGIS实战】软件操作篇——服务发布及权限管理
【伸手党福利】开发人员重装系统顺序
Edlines: a real time line segment detector with a false detection control
Feign remote call and getaway gateway
监听器 Listener
Kmeans