Web Application Development: Bootstrap
Web Application Development: Bootstrap
Bootstrap
Outline
• Concepts of Bootstrap
• Installing Bootstrap
• Using Bootstrap
• Developing Websites with Bootstrap
2
Introduction
• Bootstrap is a front-end framework for
fast and easy web development
• Bootstrap is currently the most popular
HTML/CSS/JavaScript framework for
developing responsive websites
• Bootstrap is compatible with all modern
web browsers such as Chrome, Firefox,
Safari, Internet Explorer, and Opera
3
Installing Bootstrap
• Bootstrap can be installed using off-line method
or on-line method
• In off-line method, bootstrap is downloaded
from getbootstrap.com and is added to the
HTML <link> and <script> tags:
<head>
<link rel="stylesheet" href="bootstrap.min.css">
<script src="jquery-3.1.0.min.js"></script>
<script src="bootstrap.min.js"></script>
</head>
• In on-line method, bootstrap is included from a
Content Delivery Network (CDN)
4
Installing Bootstrap
• Example of bootstrap provided by MaxCDN:
<head>
<link rel=“stylesheet”
href=“http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/
css/bootstrap.min.css">
</link>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/
3.3.7/js/bootstrap.min.js">
</script>
</head>
5
Using Bootstrap
• Bootstrap is used on top of HTML/CSS/
JavaScript/jQuery
• Bootstrap functions and styling are called by
declaring the appropriate “Bootstrap class” to
the HTML element. The syntax is similar to CSS
syntax
<div class="container">
<h1>My First Bootstrap Page</h1>
<p>Some text here</p>
</div>
6
Using Bootstrap
<div class="jumbotron text-center"> <div class="container">
<h1> <div class="row">
My First Bootstrap Page <div class="col-sm-4">
</h1> <h3>Column 1</h3>
<p> <p>Some text here</p>
My First Bootstrap Page </div>
</p> <div class="col-sm-4">
</div> <h3>Column 2</h3>
<p>Some text here</p>
</div>
<div class="col-sm-4">
<h3>Column 3</h3>
<p>Some text here</p>
</div>
</div>
</div>
7
Using Bootstrap
8
Developing Websites with Bootstrap
• Step 1: identify type of website and
understand required functions of the
website
• Step 2: choose and download a bootstrap
theme from existing repositories. For
example:
• https://startbootstrap.com
• https://www.bootstrapzero.com
• Step 3: customize downloaded bootstrap
theme to meet the required functions of the
website
9
Demonstrating Example
• Topic: design and develop a personal
website for freelancer
• Step 1: type of website: personal blog
• Core information:
• Personal information
• Working experiences
• Skills
• Languages
10
Demonstrating Example
• Step 2: choose and download bootstrap
theme from https://startbootstrap.com
11
Demonstrating Example
13
Demonstrating Example
15
Demonstrating Example
• Examples of customized header:
• The change of profile image and job information
<!-- Header -->
<header>
<div class="container">
<div class="row">
<div class="col-lg-12">
<img class="img-responsive img-circle" src="img/
helen.jpg" alt="">
<div class="intro-text">
<h1>Helen Cooper</h1>
<hr class="star-light">
<span class="skills">Web Developer and Web
Designer</span>
16
17