当前位置:网站首页>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>
理解了这个布局后,其他的栅格布局应该都能做出来
边栏推荐
- [deep learning] activation function (sigmoid, etc.), forward propagation, back propagation and gradient optimization; optimizer. zero_ grad(), loss. backward(), optimizer. Function and principle of st
- Nacos
- pytorch nn. AdaptiveAvgPool2d(1)
- Database DDL (data definition language) knowledge points
- 10、Scanner. Next() cannot read spaces /indexof -1
- shell脚本使用两个横杠接收外部参数
- C # realize solving the shortest path of unauthorized graph based on breadth first BFS -- complete program display
- ASGNet论文和代码解读2
- Explain spark operation mode in detail (local+standalone+yarn)
- 复习专栏之---消息队列
猜你喜欢

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

Bilinear upsampling and f.upsample in pytorch_ bilinear

Learning notes for introduction to C language multithreaded programming

How to display scrollbars on the right side of the background system and how to solve the problem of double scrollbars

后台系统右边内容如何出现滚动条和解决双滚动条的问题

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

Asgnet paper and code interpretation 2

监听器 Listener

JUC学习

RSN:Learning to Exploit Long-term Relational Dependencies in Knowledge Graphs
随机推荐
10、Scanner. Next() cannot read spaces /indexof -1
Overview of EtherCAT principle
Avalanche problem and the use of sentinel
pytorch nn.AdaptiveAvgPool2d(1)
数据交换 JSON
Basic concept and classification of sorting
pytorch nn. AdaptiveAvgPool2d(1)
Subnet division (10)
二叉树神级遍历:Morris遍历
Research on target recognition and tracking based on 3D laser point cloud
C language EXECL function
4. [WebGIS practice] software operation chapter - data import and processing
4、【WebGIS实战】软件操作篇——数据导入及处理
Test function in pychram
ASGNet论文和代码解读2
Feign远程调用和Getaway网关
Edlines: a real time line segment detector with a false detection control
【读书笔记】《文案变现》——写出有效文案的四个黄金步骤
The method to measure the similarity of two vectors: cosine similarity, pytorch calculate cosine similarity: torch nn. CosineSimilarity(dim=1, eps=1e-08)
Depth first traversal of C implementation Diagram -- non recursive code