html Bootstrap-Powered HTML:基本的bootstrap布局示例,包含导航栏,jumbotron,容器,行,列
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了html Bootstrap-Powered HTML:基本的bootstrap布局示例,包含导航栏,jumbotron,容器,行,列相关的知识,希望对你有一定的参考价值。
<!-- Bootstrap-Powered HTML -->
<!-- Students:
1. Where is the HTML document drawing its styles from?
2. How does our browser know which element to style in which way? (ex: button face or background banner)
-->
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="UTF-8">
<title>Coding Bootcamp!</title>
<!-- We link our html to the Bootstrap CDN -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
</head>
<body>
<!-- Container Div -->
<div class="container">
<!-- Section 1: Navbar-->
<nav class="navbar navbar-default">
<!-- Place Fluid Container in Navbar -->
<div class="container-fluid">
<!-- Designate a navbar heading -->
<div class="navbar-header">
<!-- Collapsible button -->
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<!-- navbar button elements-->
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span> <!-- first line -->
<span class="icon-bar"></span> <!-- second line -->
<span class="icon-bar"></span> <!-- third line -->
</button>
<!-- Our brand / logo -->
<a class="navbar-brand" href="#">The Coding Bootcamp</a>
</div>
<!-- The links of our navbar -->
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Contact</a></li>
<!-- a Dropdown menu -->
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li role="separator" class="divider"></li>
<li class="dropdown-header">Nav header</li>
<li><a href="#">Separated link</a></li>
<li><a href="#">One more separated link</a></li>
</ul>
</li>
</ul>
<!-- More links -->
<ul class="nav navbar-nav navbar-right">
<li class="active"><a href="./">Default <span class="sr-only">(current)</span></a></li>
<li><a href="../navbar-static-top/">Static top</a></li>
<li><a href="../navbar-fixed-top/">Fixed top</a></li>
</ul>
</div>
<!--/.nav-collapse -->
</div>
<!--/.container-fluid -->
</nav>
<!-- Jumbotron element -->
<div class="jumbotron">
<!-- centered text -->
<h1 class="text-center"><strong>Awesome Header</strong></h1>
<h2 class="text-center">Smaller Awesome Header</h2>
<h3 class="text-center">Even Smaller Header</h3>
<!-- button with predefined style rules -->
<p class="text-center">
<a class="btn btn-primary btn-lg" href="#" role="button">
<span class="glyphicon glyphicon-envelope"></span> Learn more</a>
</p>
</div>
<!-- a Bootstrap row with columns -->
<div class="row">
<!-- At large+ screens takes up half width (6/12) -->
<div class="col-lg-6 col-sm-12">
<!-- centered image with thumbnail rules -->
<img class="img thumbnail center-block" src="http://legacy.nerdywithchildren.com/wp-content/uploads/2013/06/ComfyChildKeyboard.jpg" alt="KidComputer" width="50%">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quis, molestiae modi accusantium animi magnam veniam, impedit asperiores sint consequuntur debitis fugit quibusdam dolor, iusto sed porro ab minus voluptatibus amet.</p>
</div>
<!-- At large+ screens takes up half width (6/12) -->
<div class="col-lg-6">
<img class="img thumbnail center-block" src="https://images.unsplash.com/photo-1477453559950-e541fa922120" alt="LittleCoder" width="50%">
<p> Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusamus, maiores, quos. At, animi, facilis. Alias itaque ab minima rerum, eaque animi nesciunt harum nemo est cumque voluptas, qui reprehenderit atque.</p>
</div>
</div>
</div>
<!-- jQuery, javascript file for the Bootstrap's javascript file to function -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!-- Bootstrap's javascript file that allows the dropdown menu to work -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
</body>
</html>
以上是关于html Bootstrap-Powered HTML:基本的bootstrap布局示例,包含导航栏,jumbotron,容器,行,列的主要内容,如果未能解决你的问题,请参考以下文章
数百个 HTML5 例子学习 HT 图形组件 – WebGL 3D 篇
数百个 HTML5 例子学习 HT 图形组件 – WebGL 3D 篇