Latihan Menggunakan Bootstrap
Latihan Menggunakan Bootstrap
Latihan Menggunakan Bootstrap
Menggunakan Bootstrap
1. Struktur File akan seperti berikut :
2. Pada file index.html, tambahkan code seperti berikut :
<!DOCTYPE html>
<html lang="en">
<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">
<title>PlanUrTrip</title>
<div class="navbar-wrapper">
<div class="navbar navbar-inverse navbar-static-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-
toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">PlanUrTrip</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Home</a></li>
<li><a href="#about">Flights</a></li>
<li><a href="#contact">Hotels</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-
toggle="dropdown">Packages <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="#">Trafalgar</a></li>
<li class="divider"></li>
<li><a href="#">Contiki</a></li>
<li class="divider"></li>
<li><a href="#">Cruises</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-
toggle="dropdown">Locations <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="#">Maldives</a></li>
<li class="divider"></li>
<li><a href="#">Malaysia</a></li>
<li class="divider"></li>
<li><a href="#">Thailand</a></li>
<li class="divider"></li>
<li><a href="#">Singapore</a></li>
<li class="divider"></li>
<li><a href="#">Egypt</a></li>
<li class="divider"></li>
<li><a href="#">America</a></li>
<li class="divider"></li>
<li><a href="#">Brazil</a></li>
<li class="divider"></li>
<li><a href="#">Mexico</a></li>
</ul>
</li>
<li>
<a href="#">About us</a>
</li>
<li>
<a href="#">Contact us</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<!-- Carousel
================================================== -->
<div class="item">
<img src="img/basic-pic4.jpg" alt="fourth slide">
<div class="container">
<div class="carousel-caption">
<h1>Sahara Desert.</h1>
<p>The Sahara is the largest subtropical hot desert and third
largest desert after Antarctica and the Arctic.</p>
<p><a class="btn btn-large btn-primary" href="#">Browse
gallery</a></p>
</div>
</div>
</div>
<div class="item">
<img src="img/basic-pic5.jpg" alt="fifth slide">
<div class="container">
<div class="carousel-caption">
<h1>Thailand.</h1>
<p>Sand Sea Resort, a magic land of the sea where you can have
your own privacy in one of the most beautiful places of the world.</p>
<p><a class="btn btn-large btn-primary" href="#">Browse
gallery</a></p>
</div>
</div>
</div>
</div>
<a class="left carousel-control" href="#myCarousel" data-
slide="prev"><span class="glyphicon glyphicon-chevron-left"></span></a>
<a class="right carousel-control" href="#myCarousel" data-
slide="next"><span class="glyphicon glyphicon-chevron-right"></span></a>
</div>
<!-- /.carousel -->
<!-- Wrap the rest of the page in another container to center all the
content. -->
</div>
<footer>
<div class="container-fluid">
<div class="row">
<div class="col-lg-12 text-center">
<p class="pull-right"><a href="#">Back to top</a></p>
<p>© 2014 PlanUrTrip, Inc. · <a href="#">Privacy</a>
· <a href="#">Terms</a></p>
</div>
</div>
</div>
</footer>
</body>
</html>
3. Pada file css/StyleSheet.css, isi dengan code seperti berikut :
/* GLOBAL STYLES
-------------------------------------------------- */
/* Padding below the footer and lighter body text */
body {
padding-bottom: 40px;
color: #5a5a5a;
}
/* CUSTOMIZE THE NAVBAR
-------------------------------------------------- */
/* MARKETING CONTENT
-------------------------------------------------- */
footer
{
background-color: black;
padding: 50px;
}
/* RESPONSIVE CSS
-------------------------------------------------- */