Assalamualaikum Wr.Wb
Mari kita lanjutkan postingan sebelumnya tentang Bootstrap Navbar,baiklah ayo kita mulai yang belum baca part 1 silahkan baca di sini.
Ini merupakan navbar yang di lengkapi dengan buttonMari kita lanjutkan postingan sebelumnya tentang Bootstrap Navbar,baiklah ayo kita mulai yang belum baca part 1 silahkan baca di sini.
- Navbar Button
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8">
<meta name="viewport" content="witdh=device-witdh, initial-scale=1">
<link rel="stylesheet" href="css/bootstrap.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#">Blog Amatir</a>
</div>
<ul class="nav navbar-nav">
<li class="active"><a href="#">Home</a></li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">Contact
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#">Google Plus</a></li>
<li><a href="#">Email</a></li>
</ul>
</li>
<li><a href="#">About</a></li>
</ul>
<button class="btn btn-danger navbar-btn">Button</button>
</div>
</nav>
</body>
</html>
Dan inilah hasilnya
- Navbar Forms
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8">
<meta name="viewport" content="witdh=device-witdh, initial-scale=1">
<link rel="stylesheet" href="css/bootstrap.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#">Blog Amatir</a>
</div>
<ul class="nav navbar-nav">
<li class="active"><a href="#">Home</a></li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">Contact
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#">Google Plus</a></li>
<li><a href="#">Email</a></li>
</ul>
</li>
<li><a href="#">About</a></li>
</ul>
<form class="navbar-form navbar-right">
<div class="form-group">
<input type="text" class="form-control" placeholder="cari">
</div>
<button type="submit" class="btn btn-danger">Submit</button>
</form>
</div>
</nav>
</body>
</html>
Dan inilah hasilnya
- Navbar Fixed Top(Atas)
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8">
<meta name="viewport" content="witdh=device-witdh, initial-scale=1">
<link rel="stylesheet" href="css/bootstrap.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#">Blog Amatir</a>
</div>
<ul class="nav navbar-nav">
<li class="active"><a href="#">Home</a></li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">Contact
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#">Google Plus</a></li>
<li><a href="#">Email</a></li>
</ul>
</li>
<li><a href="#">About</a></li>
</ul>
<form class="navbar-form navbar-right">
<div class="form-group">
<input type="text" class="form-control" placeholder="cari">
</div>
<button type="submit" class="btn btn-danger">Submit</button>
</form>
</div>
</nav>
<div class="container-fluid" style="margin-top: 55px;">
<div class="col-sm-4">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</div>
<div class="col-sm-4">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</div>
<div>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</div>
</div>
</body>
</html>
Dan hasilnya seperti ini
- Navbar Fixed Bottom(Bawah)
Maka hasilnya akan seperti gambar di bawah ini
Akhirnya tuntas juga mengenai navbar dengan bootstrap ini,dan mungkin cukup sekian postingan kali ini semoga bermanfaat sampai jumpa di postingan berikutnya.
Referensi:http://w3schools.com/
Referensi:http://w3schools.com/
Wassalamualaikum Wr.Wb
0 komentar:
Posting Komentar