close
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<title>Title Page</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
<!--[if lt IE 9]>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<style type="text/css">
body{
position: relative;
}
#section1,#section2,#section3,#section41,#section42{
padding-top: 50px;
height: 500px;
color: #fff;
}
#section1{
background-color: #00a;
}
#section2{
background-color: #0a0;
}
#section3{
background-color: #a00;
}
#section41{
background-color: #00a;
}
#section42{
background-color: #0a0;
}
</style>
</head>
<body data-spy='scroll' data-target='.navbar' data-offset='50'>
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" data-toggle="collapse" data-target="#myNavbar" class="navbar-toggle">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="#" class="navbar-brand">品牌名稱</a>
</div>
<!-- 沒有class -->
<div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav">
<li><a href="#section1">第1個</a></li>
<li><a href="#section2">第2個</a></li>
<li><a href="#section3">第3個</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
第4個
<span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li><a href="#section41">第4-1個</a></li>
<li><a href="#section42">第4-2個</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
</nav>
<div id="section1" class="container-fluid">
<h1>第1個</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Omnis unde illum incidunt, eius labore, repellendus dolores quibusdam dolor quia, ipsam illo. Maxime blanditiis impedit dolores, ratione at cupiditate, laudantium sit!</p>
</div>
<div id="section2" class="container-fluid">
<h1>第2個</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Doloremque saepe deserunt debitis ut provident blanditiis obcaecati asperiores eum, libero impedit illum voluptates laudantium quaerat laborum incidunt expedita natus, excepturi laboriosam!</p>
</div>
<div id="section3" class="container-fluid">
<h1>第3個</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Molestiae eaque voluptatum voluptas fuga excepturi debitis delectus nam, blanditiis pariatur ex, iure in assumenda? Repellat non veniam, asperiores cum, voluptatum mollitia.</p>
</div>
<div id="section41" class="container-fluid">
<h1>第4-1個</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Molestiae eaque voluptatum voluptas fuga excepturi debitis delectus nam, blanditiis pariatur ex, iure in assumenda? Repellat non veniam, asperiores cum, voluptatum mollitia.</p>
</div>
<div id="section42" class="container-fluid">
<h1>第4-2個</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Molestiae eaque voluptatum voluptas fuga excepturi debitis delectus nam, blanditiis pariatur ex, iure in assumenda? Repellat non veniam, asperiores cum, voluptatum mollitia.</p>
</div>
<script src="https://code.jquery.com/jquery.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
</body>
</html>
全站熱搜
留言列表