bootstrap实战-起步案例的再编写

固定位置的导航条:
(记事本写的,没有缩进)

<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE-edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Bootstrap 101 Templatetitle>
<link href="http://cdn.bootcss.com/bootstrap/3.3.1/css/bootstrap-theme.min.css" rel="stylesheet">
<link href="http://cdn.bootcss.com/bootstrap/3.3.1/css/bootstrap.min.css" rel="stylesheet">
<style>
  body{
    min-height:2000px;
    padding-top: 70px;
  }
style>
head>
<body>


<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigationspan>
<span class="icon-bar">span>
<span class="icon-bar">span>
<span class="icon-bar">span>
button>
<a class="navbar-brand" href="#">Project namea>
div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Homea>li>
<li><a href="#about">Abouta>li>
<li><a href="#contact">Contacta>li>
<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="#">Actiona>li>
<li><a href="#">Another actiona>li>
<li><a href="#">Something else herea>li>
<li role="separator" class="divider">li>
<li class="dropdown-header">Nav headerli>
<li><a href="#">Separated linka>li>
<li><a href="#">One more separated linka>li>
ul>
li>
ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="../navbar/">Defaulta>li>
<li><a href="../navbar-static-top/">Static topa>li>
<li class="active"><a href="./">Fixed top <span class="sr-only">(current)span>a>li>
ul>
div>
div>
nav>


<div class="container">
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">


<ol class="carousel-indicators">
<li data-target="#carousel-example-generic" data-slide-to="0" class="active">li>
<li data-target="#carousel-example-generic" data-slide-to="1">li>
ol>


<div class="carousel-inner" role="listbox">   
<div class="active item" style="background:url('10.jpg'); background-size:cover;">  
<img src="10.jpg" alt="...">
<div class="carousel-caption">
div>
div>
<div class="item" style="background:url('10.jpg'); background-size:cover;">
<img src="10.jpg" alt="...">
<div class="carousel-caption">
div>
div> 
div>


<a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true">span>
<span class="sr-only">Previousspan>
a>
<a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true">span>
<span class="sr-only">Nextspan>
a>
div>
div>--> 


<div class="container">
<div class="row">
<div class="col-sm-4 col-md-4">
<div class="thumbnail">
<img src="06.jpg" alt="hello">
<div class="caption">
<h3>Hi Winterh3>
<p><a href="#" class="btn btn-primary" role="button">Buttona> <a href="#" class="btn btn-default" role="button">Buttona>p>
div>
div>
div>

<div class="col-sm-4 col-md-4">
<div class="thumbnail">
<img src="11.jpg" alt="hello">
<div class="caption">
<h3>Hi Winterh3>
<p><a href="#" class="btn btn-primary" role="button">Buttona> <a href="#" class="btn btn-default" role="button">Buttona>p>
div>
div>
div>

<div class="col-sm-4 col-md-4">
<div class="thumbnail">
<img src="07.jpg" alt="hello">
<div class="caption">
<h3>Hi Winterh3>
<p><a href="#" class="btn btn-primary" role="button">Buttona> <a href="#" class="btn btn-default" role="button">Buttona>p>
div>
div>
div>
div>
div>
<script src="http://cdn.bootcss.com/jquery/2.1.1/jquery.min.js">script>
<script src="http://cdn.bootcss.com/bootstrap/3.3.1/js/bootstrap.min.js">script>
<script src="http://cdn.bootcss.com/bootstrap/3.3.1/js/npm.js">script>
body>
html>

结果:
bootstrap实战-起步案例的再编写_第1张图片

你可能感兴趣的:(bootstrap,bootstrap)