- Bootstrap 4:Responsive Web Design
- Silvio Moreto Matt Lambert Benjamin Jakobus Jason Marah
- 140字
- 2021-07-09 18:54:47
Do a grid again
We have finally finished the navigation bar. Now it's time to the page main content. For that, we must create a page grid. Following how Twitter uses a three-column-based layout, we will do the same. The HTML code for the scaffolding is the one that should be placed after the <nav>
element:
<div class="container"> <div class="row"> <div id="profile" class="col-md-3 hidden-sm hidden-xs"></div> <div id="main" class="col-sm-12 col-md-6"> </div> <div id="right-content" class="col-md-3 hidden-sm hidden-xs"> </div> </div> </div>
To understand it, we just created a .container
with a single .row
. The .row
contains three columns, the first and the last being visible only for medium and larger devices. This is because of the .hidden-sm
and .hidden-xs
classes. When both columns are hidden, the middle column fills the row completely. This is because of the .col-sm-12
class.
To finish that, add a padding-top
to <body>
in order to correct the page's position with respect to the navigation bar:
body { padding-top: 4em; background-color: #F5F8FA; }
- Clojure for Domain:specific Languages
- RTC程序設(shè)計(jì):實(shí)時(shí)音視頻權(quán)威指南
- Access 2010數(shù)據(jù)庫(kù)基礎(chǔ)與應(yīng)用項(xiàng)目式教程(第3版)
- HTML5+CSS3網(wǎng)站設(shè)計(jì)教程
- 精通Python設(shè)計(jì)模式(第2版)
- Linux命令行與shell腳本編程大全(第4版)
- Visual FoxPro程序設(shè)計(jì)
- Learning AngularJS for .NET Developers
- D3.js By Example
- UNIX Linux程序設(shè)計(jì)教程
- Android群英傳
- 平面設(shè)計(jì)經(jīng)典案例教程:CorelDRAW X6
- 新印象:解構(gòu)UI界面設(shè)計(jì)
- Python 3 Object:oriented Programming(Second Edition)
- Getting Started with React VR