SlideShare a Scribd company logo
Bootstrap Components
Glyphicons
• Bootstrap provides 250 to 260 glyphicons from the Glyphicons Halflings set.
• Glyphicons can be used in text, buttons, toolbars, navigation, forms, etc.
Example:
Glyphicon Syntax:
<span class="glyphicon glyphicon-name"></span>
Dropdowns
• A dropdown menu is a toggleable menu that allows the user to choose one value from a
predefined list.
• Example:
• The .dropdown class indicates a dropdown menu.
• To open the dropdown menu, use a button or a link with a class of .dropdown-toggle and
the data-toggle="dropdown" attribute.
• The .caret class creates a caret arrow icon (), which indicates that the button is a
dropdown.
• Add the .dropdown-menu class to a <ul> element to actually build the dropdown menu.
Dropup
• The dropdown menu to expand upwards instead of downwards, change the <div>
element with class="dropdown" to “dropup”.
• Example:
• Syntax :<div class="dropup">…….</div>
Divider:
• Add a divider to separate series of links in a dropdown menu.
• Syntax:<ul class="dropdown-menu" >
...
<li role="separator" class="divider"> </li>
...
</ul>
Button Groups
 Bootstrap allows you to group a series of buttons together (on a single line).
 Use a <div> element with class .btn-group to create a button group.
 Syntax :
Button toolbar:
 Combine sets of <div class="btn-group"> into a <div class="btn-toolbar"> for more complex
components.
Example:<div class="btn-toolbar" role="toolbar" aria-label="...">
<div class="btn-group" role="group" aria-label="...">
</div> <div class="btn-group" role="group" aria-label="...">.
</div> <div class="btn-group" role="group" aria-label="...">
</div> </div>
Sizing:
Instead of applying button sizing classes to every button in a group, just add .btn-
group-* to each .btn-group, including when nesting multiple groups.
Example:
<div class="btn-group btn-group-lg" role="group" aria-label="...">
</div><div class="btn-group" role="group" aria-label="..."></div>
<div class="btn-group btn-group-sm" role="group" aria-label="..."></div>
<div class="btn-group btn-group-xs" role="group" aria-label="..."></div>
Nesting:
 Place a .btn-group within another .btn-group when you want
dropdown menus mixed with a series of buttons.
Example:
Vertical variation:
 Make a set of buttons appear vertically stacked rather than
horizontally.
Justified button groups:
With <a> elements: Wrap a series of .btns in .btn-group.btn-group
justified.
With <button> elements: Justified button groups with
<button> elements, must wrap each button in a button group.
Button dropdowns:
 Use any button to trigger a dropdown menu by placing it within a .btn-
group and providing the proper menu markup.
Single button dropdowns:
 Turn a button into a dropdown toggle with some markup changes.
Split button dropdowns:
 create split button dropdowns with the same markup changes, only with a
separate button.
Sizing:
 Button dropdowns work with buttons of all sizes.
Dropup variation:
 Trigger dropdown menus above elements by adding .dropup to the
parent.
Input groups:
 Extend form controls by adding text or buttons before, after, or on both sides of any text-based
<input>. Use .input-group with an .input-group-addon or .input-group-btn to prepend or append
elements to a single .form-control.
 Place one add-on or button on either side of an input. You may also place one on both sides of
an input.
Sizing:
 Add the relative form sizing classes to the .input-group itself and contents
within will automatically resize
 No need for repeating the form control size classes on each element.
Checkboxes and radio addons:
 Checkbox or radio option will be placed within an input group's addon
instead of text.
Button addons:
 Buttons in input groups are a bit different and require one extra level of
nesting. Instead of .input-group-addon, you'll need to use .input-group
btn to wrap the buttons.
Buttons with dropdowns:
It shows the buttons with dropdowns.
Segmented buttons:
The input text can contain text, button and a dropdown.
Multiple buttons:
While you can only have one add-on per side, you can have multiple buttons inside
a single .input-group-btn.
Navs
 Bootstrap provides an easy and quick way to create basic nav
components like tabs and pills which are very flexible and elegant.
 All the Bootstrap's nav components—tabs and pills—share the same base
markup and styles through the base .nav class.
Tabs
Tabs are created with <ul class="nav nav-tabs">
Also mark the current page with <li class="active">.
Pills:
 Pills are created with <ul class="nav nav-pills">. Also mark the current page with
<li class="active">
 Pills are also vertically stackable. Just add .nav.stacked.
Justified:
 Easily make tabs or pills equal widths of their parent at screens wider than 768px with .nav-
justified. On smaller screens, the nav links are stacked.
Disabled links:
For any nav component (tabs or pills), add .disabled for gray links and no hover effects.
Using dropdowns:
Add dropdown menus for tabs and pills by using this syntax
classes:
Tabs with dropdowns:
Pills with dropdowns:
Navbar
• A navigation bar is a navigation header that is placed at the top of the page.
• With navigation bar can extend or collapse, depending on the screen size.
• A standard navigation bar is created with <nav class="navbar navbar-default">
• Example :
• Syntax :
Inverted navbar
• Just change the .navbar-default class into .navbar-inverse.
Example :
Syntax:
Navbar Brand image
• Replace the navbar brand with your own image by swapping the text for
an <img>
• Syntax :
Navbar Forms
• To add form elements inside the navbar, add the .navbar-form. class to a
form element and add an input(s).
• we have added a .form-group class to the div container holding the input.
This adds proper padding if you have more than one inputs
Navbar Buttons
• Add buttons inside the navbar, add the .navbar-btn class on a button.
Navbar Text
• strings of text in an element with .navbar-text with proper padding and
text color.(vertical alignment of elements inside the navbar in bootstrap)
Fixed Navigation Bar
• The navigation bar can also be fixed at the top or at the bottom of the
page.
• A fixed navigation bar stays visible in a fixed position (top or bottom)
independent of the page scroll.
Fixed to top
• The .navbar-fixed-top class makes the navigation bar fixed at the top.
Fixed to bottom
• The .navbar-fixed-bottom class makes the navigation bar fixed at the
bottom.
Static top
• navbar that scrolls away with the page by adding the class .navbar-static-
top.
Breadcrumbs
• A breadcrumb is a navigation scheme that indicates current page's
location to the user within a website or application.
• Breadcrumb navigation can greatly enhance the accessibility of the
websites having a large number of pages.
Pagination
• A web site with lots of pages, you may wish to add some sort of
pagination to each page.
Active State
• The active state shows what is the current page
• Add class .active to let the user know which page he/she is on.
Example:
Disabled State
• A disabled link cannot be clicked:
• Add class .disabled if a link is disabled.
Example :
Pagination Sizing
• Pagination blocks can also be sized to a larger size or a
smaller size.
• Add class .pagination-lg for larger blocks or
• Add class .pagination-sm for larger blocks.
Pager
• Pager provides previous and next buttons or links.
• Previous/next buttons created by add .pager class to <ul> element.
• Aligned links or Buttons: align each link or a button to the sides of the
page.
Labels
• Labels are used to provide additional information about something.
Available variations:Add any of the below mentioned modifier classes to
change the appearance of a label.
Badges
• Badges are numerical indicators of how many items are associated with a
link
Active nav states:Built-in styles are included for placing badges in active
states in pill navigations.
Jumbotron
 A jumbotron indicates a big box for calling extra attention to some special
content or information.
 A jumbotron is displayed as a grey box with rounded corners. It also
enlarges the font sizes of the text inside it.
 Use a <div> element with class .jumbotron to create a jumbotron.
Page header
• A page header is like a section divider.
• The .page-header class adds a horizontal line under the heading (+ adds
some extra space around the element)
Thumbnails
• The thumbnail component to easily display grids of images, videos, text,
and more.
• Add an <a> tag with the class of .thumbnail around an image.
• Syntax :
Adding Custom Content
• it's possible to add any kind of HTML content like headings, paragraphs,
or buttons into thumbnails.
Syntax:
Alerts
• Bootstrap provides an easy way to create predefined alert messages.
• Alerts are created with the .alert class, followed by one of the four
contextual classes . alert-success, alert-info, alert-warning or alert-danger.
• Syntax:
Dismissible alerts
• To close the alert message, add a .alert-dismissable class to the alert
container. Then add class="close" and data-dismiss="alert" to a link or a
button element (when you click on this the alert box will disappear).
Example:
Links in alerts
• Add the alert-link class to any links inside the alert box to create "matching
colored links“.
• Syntax:
Animated Alerts
• The .fade and .in classes adds a fading effect when closing
the alert message.
• Syntax:<div class="alert alert-danger fade in">
Progress bars
• A progress bar can be used to show a user how far along he/she is in a
process.
• A default progress bar in Bootstrap looks like this:
Example :
• To create a default progress bar,add a .progress class to a <div> element:
Syntax:
Progress Bar With Label
A progress bar with a label looks like this:
Remove the .sr-only class form the progress bar to show a visible
percentage.
Syntax:
Colored Progress Bars
• Contextual classes are used to provide "meaning through colors".
• The contextual classes that can be used with progress bars are:
Striped Progress Bars
• Progress bars can also be striped.
• Add class .progress-bar-stripped to add stripes to the progress bars.
Animated Progress Bar
• Add class .Active to animate the progress bar
Stacked Progress Bars
• Create a stacked progress bar by placing multiple bars into the same <div
class="progress">.
Media Objects
• Bootstrap provides an easy way to align media objects (like images or
videos) to the left or to the right of some content.
• This can be used to display blog comments, tweets and so on
Basic Media Object
Left aligned :
Syntax :
Right Aligned :
Example :
Syntax:
Top, Middle or Bottom Alignment
 The media object can also be top, middle or bottom aligned with the media-top, media-middle or
media-bottom class.
Nesting Media Objects
Media objects can also be nested (a media object inside a media object).
Another Example of Nesting
List Groups
The most basic list group is an unordered list with list items.
Example:
.
To create a basic list group, use an <ul> element with class .list-group,
and <li> elements with class .list-group-item
Syntax:
<ul class="list-group">
<li class="list-group-item">First item</li>
<li class="list-group-item">Second item</li>
<li class="list-group-item">Third item</li>
</ul>
List Group With Badges
• You can also add badges to a list group. The badges will automatically be
positioned on the right.
Example :
• To create a badge, create a <span> element with class .badge inside the
list item.
Syntax:
<ul class="list-group">
<li class="list-group-item">New <span class="badge">12</span></li>
<li class="list-group-item">Deleted <span class="badge">5</span></li>
<li class="list-group-item">Warnings <span class="badge">3</span></li>
</ul>
List Group With Linked Items
• The items in a list group can also be hyperlinks. This will add a grey
background color on hover
• To create a list group with linked items, use <div> instead of <ul> and <a>
instead of <li>
Example :
Syntax:
<div class="list-group">
<a href="#" class="list-group-item">First item</a>
<a href="#" class="list-group-item">Second item</a>
<a href="#" class="list-group-item">Third item</a>
</div>
Active State
Use the .active class to highlight the current item
Example :
Syntax:
 <div class="list-group">
<a href="#" class="list-group-item active">First item</a>
<a href="#" class="list-group-item">Second item</a>
<a href="#" class="list-group-item">Third item</a>
</div>
Disabled Item
To disable an item, add the .disabled class:
Example :
Syntax:
<div class="list-group">
<a href="#" class="list-group-item disabled">First item</a>
<a href="#" class="list-group-item">Second item</a>
<a href="#" class="list-group-item">Third item</a>
</div>
Contextual Classes
• Contextual classes can be used to color list items
• The classes for coloring list-items are: .list-group-item-success, list-
group-item-info, list-group-item-warning, and .list-group-item-danger
Example :
Syntax :
<ul class="list-group">
<li class="list-group-item list-group-item-success">First item</li>
<li class="list-group-item list-group-item-info">Second item</li>
<li class="list-group-item list-group-item-warning">Third item</li>
<li class="list-group-item list-group-item-danger">Fourth item</li>
</ul>
Custom Content
• Add any HTML inside a list group item.
• Bootstrap provides the classes .list-group-item-heading and .list-group-item-text.
Syntax:
<div class="list-group">
<a href="#" class="list-group-item active">
<h4 class="list-group-item-heading">First List Group Item Heading</h4>
<p class="list-group-item-text">List Group Item Text</p>
</a>
<a href="#" class="list-group-item">
<h4 class="list-group-item-heading">Second List Group Item Heading</h4>
<p class="list-group-item-text">List Group Item Text</p>
</a>
<a href="#" class="list-group-item">
<h4 class="list-group-item-heading">Third List Group Item Heading</h4>
<p class="list-group-item-text">List Group Item Text</p>
</a>
</div>
Example:
Panels
• A panel in bootstrap is a bordered box with some padding around its
content.
• Panels are created with the .panel class, and the content inside the panel
has a .panel-body class.
Example :
Syntax:
<div class="panel panel-default">
<div class="panel-body">A Basic Panel</div>
</div>
Panel Heading
The .panel-heading class adds a heading to the panel.
Example :
Syntax:
<div class="panel panel-default">
<div class="panel-heading">Panel Heading</div>
<div class="panel-body">Panel Content</div>
</div>
Panel Footer
The .panel-footer class adds a footer to the panel.
Example :
Syntax:
<div class="panel panel-default">
<div class="panel-body">Panel Content</div>
<div class="panel-footer">Panel Footer</div>
</div>
Panel Group
 To group many panels together, wrap a <div> with class .panel-group
around them.
 The .panel-group class clears the bottom-margin of each panel.
Syntax :
<div class="panel-group">
<div class="panel panel-default">
<div class="panel-body">Panel Content</div>
</div>
<div class="panel panel-default">
<div class="panel-body">Panel Content</div>
</div>
</div>
Panels with Contextual Classes
To color the panel, use contextual classes (.panel-default, .panel-primary,
.panel-success, .panel-info, .panel-warning, or .panel-danger).
Responsive embed
• Bootstrap's responsive embed component provides an easy way to scale videos and
slide shows to their containing block.
• The responsive embed component can be used on <iframe>, <video>, <object>, and
<embed> elements.
• To apply the responsive embed component to one of these elements, wrap the element
within a <div> element with the .embed-responsive class, along with an intrinsic ratio
class (eg, .responsive-embed-16by9 or .responsive-embed-4by3).
Syntax:
Wells
The .well class adds a rounded border around an element with a gray background color and
some padding
Example :
Syntax:
<div class="well">Basic Well</div>
Well size :Change the size of the well by adding the .well-sm class for small wells or .well-lg
class for large wells.
Modal
The Modal plugin is a dialog box/popup window that is displayed on top of the current page.
Syntax:
Example Explanation
The "Trigger" part:
To trigger the modal window, you need to use a button or a link.
Then include the two data-* attributes:
data-toggle="modal" opens the modal window
data-target="#myModal" points to the id of the modal
The "Modal" part:
The parent <div> of the modal must have an ID that is the same as the value of the data-target attribute used to trigger the modal
("myModal").
The .modal class identifies the content of <div> as a modal and brings focus to it.
The .fade class adds a transition effect which fades the modal in and out. Remove this class if you do not want this effect.
The attribute role="dialog" improves accessibility for people using screen readers.
The .modal-dialog class sets the proper width and margin of the modal.
The "Modal content" part:
The <div> with class="modal-content" styles the modal (border, background-color, etc.). Inside this <div>, add the modal's header, body, and
footer.
The .modal-header class is used to define the style for the header of the modal. The <button> inside the header has a data-dismiss="modal"
attribute which closes the modal if you click on it. The .close class styles the close button, and the .modal-title class styles the header with a
proper line-height.
The .modal-body class is used to define the style for the body of the modal. Add any HTML markup here; paragraphs, images, videos, etc.
The .modal-footer class is used to define the style for the footer of the modal. Note that this area is right aligned by default.
Model size
• Change the size of the modal by adding the .modal-sm class for small
modals or .modal-lg class for large modals.
• Add the size class to the <div> element with class .modal-dialog.
Small Modal:
<div class="modal-dialog modal-sm">
Large Modal:
<div class="modal-dialog modal-lg">
Scrollspy
The Scrollspy plugin is used to automatically update links in a navigation list
based on scroll position.
Example:
Syntax:
<!-- The scrollable area -->
<body data-spy="scroll" data-target=".navbar" data-offset="50">
<!-- The navbar - The <a> elements are used to jump to a section in the scrollable area -->
<nav class="navbar navbar-inverse navbar-fixed-top">
...
<ul class="nav navbar-nav">
<li><a href="#section1">Section 1</a></li>
...
</nav>
<!-- Section 1 -->
<div id="section1">
<h1>Section 1</h1>
<p>Try to scroll this page and look at the navigation bar while scrolling!</p>
</div>
...
</body>
Example Explanation:
• Add data-spy="scroll" to the element that should be used as the
scrollable area (often this is the <body> element).
• Then add the data-target attribute with a value of the id or the class
name of the navigation bar (.navbar). This is to make sure that the
navbar is connected with the scrollable area.
• Note that scrollable elements must match the ID of the links inside the
navbar's list items (<div id="section1"> matches <a href="#section1">).
• The optional data-offset attribute specifies the number of pixels to
offset from top when calculating the position of scroll. This is useful
when you feel that the links inside the navbar changes the active state
too soon or too early when jumping to the scrollable elements. Default
is 10 pixels.
Carousel
The Carousel plugin is a component for cycling through elements, like a
carousel (slideshow).
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
<li data-target="#myCarousel" data-slide-to="3"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
<div class="item active">
<img src="img_chania.jpg" alt="Chania">
</div>
<div class="item">
<img src="img_chania2.jpg" alt="Chania">
</div>
<div class="item">
<img src="img_flower.jpg" alt="Flower">
</div>
<div class="item">
<img src="img_flower2.jpg" alt="Flower">
</div>
</div>
 <!-- Left and right controls -->
<a class="left carousel-control" href="#myCarousel" role="button" data-
slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-
hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#myCarousel" role="button" data-
slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-
hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
Affix
 The Affix plugin allows an element to become affixed (locked) to an area on the page.
 Navigation menus or social icon buttons, to make them "stick" at a specific area while scrolling up
and down the page.
 The plugin toggles this behavior on and off (changes the value of CSS position from static to
fixed), depending on scroll position.
Bootstrap PPT Part - 2

More Related Content

PPTX
Bootstrap ppt
PPTX
Html form tag
PPTX
Bootstrap
PPTX
Bootstrap PPT by Mukesh
PDF
Bootstrap
PPTX
Bootstrap 3
PPTX
Bootstrap grids
PPTX
CSS Transitions, Transforms, Animations
Bootstrap ppt
Html form tag
Bootstrap
Bootstrap PPT by Mukesh
Bootstrap
Bootstrap 3
Bootstrap grids
CSS Transitions, Transforms, Animations

What's hot (20)

PPTX
Bootstrap 5 ppt
PPTX
Php.ppt
PPTX
Form using html and java script validation
PPTX
Bootstrap 3
PPT
Bootstrap Part - 1
PPTX
Html5 tutorial for beginners
PPTX
An introduction to bootstrap
ODP
Introduction of Html/css/js
PDF
jQuery for beginners
PPT
Introduction to BOOTSTRAP
PPTX
Bootstrap - Basics
PDF
Introduction to Bootstrap
PPT
CSS for Beginners
PPTX
Css selectors
PPTX
Html5 and-css3-overview
PPS
Introduction to Bootstrap: Design for Developers
PPT
Java Script ppt
PPTX
Beginners css tutorial for web designers
Bootstrap 5 ppt
Php.ppt
Form using html and java script validation
Bootstrap 3
Bootstrap Part - 1
Html5 tutorial for beginners
An introduction to bootstrap
Introduction of Html/css/js
jQuery for beginners
Introduction to BOOTSTRAP
Bootstrap - Basics
Introduction to Bootstrap
CSS for Beginners
Css selectors
Html5 and-css3-overview
Introduction to Bootstrap: Design for Developers
Java Script ppt
Beginners css tutorial for web designers
Ad

Similar to Bootstrap PPT Part - 2 (20)

PPTX
Introduction Bootstrap to Programming
PDF
Web Development Lecture - Bootstrap ii
PPTX
Bootstrap [part 2]
PPTX
ICT Presentjrjdjdjdkkdkeeation Final.pptx
PPTX
Bootstrap Badges and Labels.pptx
PPTX
Bootstrap 4 ppt
PPTX
Boot strap
PDF
Introduction to Responsive Web Development
PDF
Responsive Design and Bootstrap
PPTX
Twitter bootstrap
PDF
Bootstrap Training Institute, Ghaziabad
PDF
Bootstrap Workout 2015
PDF
Introduction to Bootstrap
PDF
The Ultimate Guide to Bootstrap for Beginners.pdf
PPTX
Bootstrap: the full overview
PPT
Responsive web design
PPTX
Intro to Bootstrap
PPTX
Professional bootstrap training for it companies online onsite offsite
PDF
Bootstrap 3 Cheat Sheet PDF Reference
PDF
Bootstrap notes on developing basic website by Likith.pdf
Introduction Bootstrap to Programming
Web Development Lecture - Bootstrap ii
Bootstrap [part 2]
ICT Presentjrjdjdjdkkdkeeation Final.pptx
Bootstrap Badges and Labels.pptx
Bootstrap 4 ppt
Boot strap
Introduction to Responsive Web Development
Responsive Design and Bootstrap
Twitter bootstrap
Bootstrap Training Institute, Ghaziabad
Bootstrap Workout 2015
Introduction to Bootstrap
The Ultimate Guide to Bootstrap for Beginners.pdf
Bootstrap: the full overview
Responsive web design
Intro to Bootstrap
Professional bootstrap training for it companies online onsite offsite
Bootstrap 3 Cheat Sheet PDF Reference
Bootstrap notes on developing basic website by Likith.pdf
Ad

More from EPAM Systems (8)

PPTX
Complete Notes on Angular 2 and TypeScript
PPTX
Css Complete Notes
PPTX
Css3 Complete Reference
PPT
HTML 5 Complete Reference
PPTX
Jquery Complete Presentation along with Javascript Basics
PPTX
Angular Js Get Started - Complete Course
PPTX
Angular Js Advantages - Complete Reference
PPTX
Complete Notes on Angular 2 and TypeScript
Css Complete Notes
Css3 Complete Reference
HTML 5 Complete Reference
Jquery Complete Presentation along with Javascript Basics
Angular Js Get Started - Complete Course
Angular Js Advantages - Complete Reference

Recently uploaded (20)

PPTX
Cloud computing and distributed systems.
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
KodekX | Application Modernization Development
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
Cloud computing and distributed systems.
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Network Security Unit 5.pdf for BCA BBA.
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
KodekX | Application Modernization Development
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
Chapter 3 Spatial Domain Image Processing.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Building Integrated photovoltaic BIPV_UPV.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Dropbox Q2 2025 Financial Results & Investor Presentation
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Reach Out and Touch Someone: Haptics and Empathic Computing
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
20250228 LYD VKU AI Blended-Learning.pptx

Bootstrap PPT Part - 2

  • 2. Glyphicons • Bootstrap provides 250 to 260 glyphicons from the Glyphicons Halflings set. • Glyphicons can be used in text, buttons, toolbars, navigation, forms, etc. Example: Glyphicon Syntax: <span class="glyphicon glyphicon-name"></span>
  • 3. Dropdowns • A dropdown menu is a toggleable menu that allows the user to choose one value from a predefined list. • Example: • The .dropdown class indicates a dropdown menu. • To open the dropdown menu, use a button or a link with a class of .dropdown-toggle and the data-toggle="dropdown" attribute. • The .caret class creates a caret arrow icon (), which indicates that the button is a dropdown. • Add the .dropdown-menu class to a <ul> element to actually build the dropdown menu.
  • 4. Dropup • The dropdown menu to expand upwards instead of downwards, change the <div> element with class="dropdown" to “dropup”. • Example: • Syntax :<div class="dropup">…….</div> Divider: • Add a divider to separate series of links in a dropdown menu. • Syntax:<ul class="dropdown-menu" > ... <li role="separator" class="divider"> </li> ... </ul>
  • 5. Button Groups  Bootstrap allows you to group a series of buttons together (on a single line).  Use a <div> element with class .btn-group to create a button group.  Syntax : Button toolbar:  Combine sets of <div class="btn-group"> into a <div class="btn-toolbar"> for more complex components. Example:<div class="btn-toolbar" role="toolbar" aria-label="..."> <div class="btn-group" role="group" aria-label="..."> </div> <div class="btn-group" role="group" aria-label="...">. </div> <div class="btn-group" role="group" aria-label="..."> </div> </div>
  • 6. Sizing: Instead of applying button sizing classes to every button in a group, just add .btn- group-* to each .btn-group, including when nesting multiple groups. Example: <div class="btn-group btn-group-lg" role="group" aria-label="..."> </div><div class="btn-group" role="group" aria-label="..."></div> <div class="btn-group btn-group-sm" role="group" aria-label="..."></div> <div class="btn-group btn-group-xs" role="group" aria-label="..."></div>
  • 7. Nesting:  Place a .btn-group within another .btn-group when you want dropdown menus mixed with a series of buttons. Example: Vertical variation:  Make a set of buttons appear vertically stacked rather than horizontally.
  • 8. Justified button groups: With <a> elements: Wrap a series of .btns in .btn-group.btn-group justified. With <button> elements: Justified button groups with <button> elements, must wrap each button in a button group.
  • 9. Button dropdowns:  Use any button to trigger a dropdown menu by placing it within a .btn- group and providing the proper menu markup. Single button dropdowns:  Turn a button into a dropdown toggle with some markup changes. Split button dropdowns:  create split button dropdowns with the same markup changes, only with a separate button.
  • 10. Sizing:  Button dropdowns work with buttons of all sizes. Dropup variation:  Trigger dropdown menus above elements by adding .dropup to the parent.
  • 11. Input groups:  Extend form controls by adding text or buttons before, after, or on both sides of any text-based <input>. Use .input-group with an .input-group-addon or .input-group-btn to prepend or append elements to a single .form-control.  Place one add-on or button on either side of an input. You may also place one on both sides of an input.
  • 12. Sizing:  Add the relative form sizing classes to the .input-group itself and contents within will automatically resize  No need for repeating the form control size classes on each element.
  • 13. Checkboxes and radio addons:  Checkbox or radio option will be placed within an input group's addon instead of text. Button addons:  Buttons in input groups are a bit different and require one extra level of nesting. Instead of .input-group-addon, you'll need to use .input-group btn to wrap the buttons.
  • 14. Buttons with dropdowns: It shows the buttons with dropdowns. Segmented buttons: The input text can contain text, button and a dropdown.
  • 15. Multiple buttons: While you can only have one add-on per side, you can have multiple buttons inside a single .input-group-btn.
  • 16. Navs  Bootstrap provides an easy and quick way to create basic nav components like tabs and pills which are very flexible and elegant.  All the Bootstrap's nav components—tabs and pills—share the same base markup and styles through the base .nav class. Tabs Tabs are created with <ul class="nav nav-tabs"> Also mark the current page with <li class="active">.
  • 17. Pills:  Pills are created with <ul class="nav nav-pills">. Also mark the current page with <li class="active">  Pills are also vertically stackable. Just add .nav.stacked.
  • 18. Justified:  Easily make tabs or pills equal widths of their parent at screens wider than 768px with .nav- justified. On smaller screens, the nav links are stacked. Disabled links: For any nav component (tabs or pills), add .disabled for gray links and no hover effects.
  • 19. Using dropdowns: Add dropdown menus for tabs and pills by using this syntax classes: Tabs with dropdowns:
  • 21. Navbar • A navigation bar is a navigation header that is placed at the top of the page. • With navigation bar can extend or collapse, depending on the screen size. • A standard navigation bar is created with <nav class="navbar navbar-default"> • Example : • Syntax :
  • 22. Inverted navbar • Just change the .navbar-default class into .navbar-inverse. Example : Syntax:
  • 23. Navbar Brand image • Replace the navbar brand with your own image by swapping the text for an <img> • Syntax :
  • 24. Navbar Forms • To add form elements inside the navbar, add the .navbar-form. class to a form element and add an input(s). • we have added a .form-group class to the div container holding the input. This adds proper padding if you have more than one inputs Navbar Buttons • Add buttons inside the navbar, add the .navbar-btn class on a button. Navbar Text • strings of text in an element with .navbar-text with proper padding and text color.(vertical alignment of elements inside the navbar in bootstrap)
  • 25. Fixed Navigation Bar • The navigation bar can also be fixed at the top or at the bottom of the page. • A fixed navigation bar stays visible in a fixed position (top or bottom) independent of the page scroll. Fixed to top • The .navbar-fixed-top class makes the navigation bar fixed at the top. Fixed to bottom • The .navbar-fixed-bottom class makes the navigation bar fixed at the bottom. Static top • navbar that scrolls away with the page by adding the class .navbar-static- top.
  • 26. Breadcrumbs • A breadcrumb is a navigation scheme that indicates current page's location to the user within a website or application. • Breadcrumb navigation can greatly enhance the accessibility of the websites having a large number of pages.
  • 27. Pagination • A web site with lots of pages, you may wish to add some sort of pagination to each page.
  • 28. Active State • The active state shows what is the current page • Add class .active to let the user know which page he/she is on. Example: Disabled State • A disabled link cannot be clicked: • Add class .disabled if a link is disabled. Example :
  • 29. Pagination Sizing • Pagination blocks can also be sized to a larger size or a smaller size. • Add class .pagination-lg for larger blocks or • Add class .pagination-sm for larger blocks.
  • 30. Pager • Pager provides previous and next buttons or links. • Previous/next buttons created by add .pager class to <ul> element. • Aligned links or Buttons: align each link or a button to the sides of the page.
  • 31. Labels • Labels are used to provide additional information about something. Available variations:Add any of the below mentioned modifier classes to change the appearance of a label.
  • 32. Badges • Badges are numerical indicators of how many items are associated with a link Active nav states:Built-in styles are included for placing badges in active states in pill navigations.
  • 33. Jumbotron  A jumbotron indicates a big box for calling extra attention to some special content or information.  A jumbotron is displayed as a grey box with rounded corners. It also enlarges the font sizes of the text inside it.  Use a <div> element with class .jumbotron to create a jumbotron.
  • 34. Page header • A page header is like a section divider. • The .page-header class adds a horizontal line under the heading (+ adds some extra space around the element)
  • 35. Thumbnails • The thumbnail component to easily display grids of images, videos, text, and more. • Add an <a> tag with the class of .thumbnail around an image. • Syntax :
  • 36. Adding Custom Content • it's possible to add any kind of HTML content like headings, paragraphs, or buttons into thumbnails.
  • 38. Alerts • Bootstrap provides an easy way to create predefined alert messages. • Alerts are created with the .alert class, followed by one of the four contextual classes . alert-success, alert-info, alert-warning or alert-danger. • Syntax:
  • 39. Dismissible alerts • To close the alert message, add a .alert-dismissable class to the alert container. Then add class="close" and data-dismiss="alert" to a link or a button element (when you click on this the alert box will disappear). Example:
  • 40. Links in alerts • Add the alert-link class to any links inside the alert box to create "matching colored links“. • Syntax:
  • 41. Animated Alerts • The .fade and .in classes adds a fading effect when closing the alert message. • Syntax:<div class="alert alert-danger fade in">
  • 42. Progress bars • A progress bar can be used to show a user how far along he/she is in a process. • A default progress bar in Bootstrap looks like this: Example : • To create a default progress bar,add a .progress class to a <div> element: Syntax:
  • 43. Progress Bar With Label A progress bar with a label looks like this: Remove the .sr-only class form the progress bar to show a visible percentage. Syntax:
  • 44. Colored Progress Bars • Contextual classes are used to provide "meaning through colors". • The contextual classes that can be used with progress bars are:
  • 45. Striped Progress Bars • Progress bars can also be striped. • Add class .progress-bar-stripped to add stripes to the progress bars. Animated Progress Bar • Add class .Active to animate the progress bar Stacked Progress Bars • Create a stacked progress bar by placing multiple bars into the same <div class="progress">.
  • 46. Media Objects • Bootstrap provides an easy way to align media objects (like images or videos) to the left or to the right of some content. • This can be used to display blog comments, tweets and so on
  • 47. Basic Media Object Left aligned : Syntax :
  • 49. Top, Middle or Bottom Alignment  The media object can also be top, middle or bottom aligned with the media-top, media-middle or media-bottom class.
  • 50. Nesting Media Objects Media objects can also be nested (a media object inside a media object).
  • 52. List Groups The most basic list group is an unordered list with list items. Example: . To create a basic list group, use an <ul> element with class .list-group, and <li> elements with class .list-group-item Syntax: <ul class="list-group"> <li class="list-group-item">First item</li> <li class="list-group-item">Second item</li> <li class="list-group-item">Third item</li> </ul>
  • 53. List Group With Badges • You can also add badges to a list group. The badges will automatically be positioned on the right. Example : • To create a badge, create a <span> element with class .badge inside the list item. Syntax: <ul class="list-group"> <li class="list-group-item">New <span class="badge">12</span></li> <li class="list-group-item">Deleted <span class="badge">5</span></li> <li class="list-group-item">Warnings <span class="badge">3</span></li> </ul>
  • 54. List Group With Linked Items • The items in a list group can also be hyperlinks. This will add a grey background color on hover • To create a list group with linked items, use <div> instead of <ul> and <a> instead of <li> Example : Syntax: <div class="list-group"> <a href="#" class="list-group-item">First item</a> <a href="#" class="list-group-item">Second item</a> <a href="#" class="list-group-item">Third item</a> </div>
  • 55. Active State Use the .active class to highlight the current item Example : Syntax:  <div class="list-group"> <a href="#" class="list-group-item active">First item</a> <a href="#" class="list-group-item">Second item</a> <a href="#" class="list-group-item">Third item</a> </div>
  • 56. Disabled Item To disable an item, add the .disabled class: Example : Syntax: <div class="list-group"> <a href="#" class="list-group-item disabled">First item</a> <a href="#" class="list-group-item">Second item</a> <a href="#" class="list-group-item">Third item</a> </div>
  • 57. Contextual Classes • Contextual classes can be used to color list items • The classes for coloring list-items are: .list-group-item-success, list- group-item-info, list-group-item-warning, and .list-group-item-danger Example : Syntax : <ul class="list-group"> <li class="list-group-item list-group-item-success">First item</li> <li class="list-group-item list-group-item-info">Second item</li> <li class="list-group-item list-group-item-warning">Third item</li> <li class="list-group-item list-group-item-danger">Fourth item</li> </ul>
  • 58. Custom Content • Add any HTML inside a list group item. • Bootstrap provides the classes .list-group-item-heading and .list-group-item-text. Syntax: <div class="list-group"> <a href="#" class="list-group-item active"> <h4 class="list-group-item-heading">First List Group Item Heading</h4> <p class="list-group-item-text">List Group Item Text</p> </a> <a href="#" class="list-group-item"> <h4 class="list-group-item-heading">Second List Group Item Heading</h4> <p class="list-group-item-text">List Group Item Text</p> </a> <a href="#" class="list-group-item"> <h4 class="list-group-item-heading">Third List Group Item Heading</h4> <p class="list-group-item-text">List Group Item Text</p> </a> </div>
  • 60. Panels • A panel in bootstrap is a bordered box with some padding around its content. • Panels are created with the .panel class, and the content inside the panel has a .panel-body class. Example : Syntax: <div class="panel panel-default"> <div class="panel-body">A Basic Panel</div> </div>
  • 61. Panel Heading The .panel-heading class adds a heading to the panel. Example : Syntax: <div class="panel panel-default"> <div class="panel-heading">Panel Heading</div> <div class="panel-body">Panel Content</div> </div>
  • 62. Panel Footer The .panel-footer class adds a footer to the panel. Example : Syntax: <div class="panel panel-default"> <div class="panel-body">Panel Content</div> <div class="panel-footer">Panel Footer</div> </div>
  • 63. Panel Group  To group many panels together, wrap a <div> with class .panel-group around them.  The .panel-group class clears the bottom-margin of each panel. Syntax : <div class="panel-group"> <div class="panel panel-default"> <div class="panel-body">Panel Content</div> </div> <div class="panel panel-default"> <div class="panel-body">Panel Content</div> </div> </div>
  • 64. Panels with Contextual Classes To color the panel, use contextual classes (.panel-default, .panel-primary, .panel-success, .panel-info, .panel-warning, or .panel-danger).
  • 65. Responsive embed • Bootstrap's responsive embed component provides an easy way to scale videos and slide shows to their containing block. • The responsive embed component can be used on <iframe>, <video>, <object>, and <embed> elements. • To apply the responsive embed component to one of these elements, wrap the element within a <div> element with the .embed-responsive class, along with an intrinsic ratio class (eg, .responsive-embed-16by9 or .responsive-embed-4by3). Syntax:
  • 66. Wells The .well class adds a rounded border around an element with a gray background color and some padding Example : Syntax: <div class="well">Basic Well</div> Well size :Change the size of the well by adding the .well-sm class for small wells or .well-lg class for large wells.
  • 67. Modal The Modal plugin is a dialog box/popup window that is displayed on top of the current page. Syntax:
  • 68. Example Explanation The "Trigger" part: To trigger the modal window, you need to use a button or a link. Then include the two data-* attributes: data-toggle="modal" opens the modal window data-target="#myModal" points to the id of the modal The "Modal" part: The parent <div> of the modal must have an ID that is the same as the value of the data-target attribute used to trigger the modal ("myModal"). The .modal class identifies the content of <div> as a modal and brings focus to it. The .fade class adds a transition effect which fades the modal in and out. Remove this class if you do not want this effect. The attribute role="dialog" improves accessibility for people using screen readers. The .modal-dialog class sets the proper width and margin of the modal. The "Modal content" part: The <div> with class="modal-content" styles the modal (border, background-color, etc.). Inside this <div>, add the modal's header, body, and footer. The .modal-header class is used to define the style for the header of the modal. The <button> inside the header has a data-dismiss="modal" attribute which closes the modal if you click on it. The .close class styles the close button, and the .modal-title class styles the header with a proper line-height. The .modal-body class is used to define the style for the body of the modal. Add any HTML markup here; paragraphs, images, videos, etc. The .modal-footer class is used to define the style for the footer of the modal. Note that this area is right aligned by default.
  • 69. Model size • Change the size of the modal by adding the .modal-sm class for small modals or .modal-lg class for large modals. • Add the size class to the <div> element with class .modal-dialog. Small Modal: <div class="modal-dialog modal-sm"> Large Modal: <div class="modal-dialog modal-lg">
  • 70. Scrollspy The Scrollspy plugin is used to automatically update links in a navigation list based on scroll position. Example:
  • 71. Syntax: <!-- The scrollable area --> <body data-spy="scroll" data-target=".navbar" data-offset="50"> <!-- The navbar - The <a> elements are used to jump to a section in the scrollable area --> <nav class="navbar navbar-inverse navbar-fixed-top"> ... <ul class="nav navbar-nav"> <li><a href="#section1">Section 1</a></li> ... </nav> <!-- Section 1 --> <div id="section1"> <h1>Section 1</h1> <p>Try to scroll this page and look at the navigation bar while scrolling!</p> </div> ... </body>
  • 72. Example Explanation: • Add data-spy="scroll" to the element that should be used as the scrollable area (often this is the <body> element). • Then add the data-target attribute with a value of the id or the class name of the navigation bar (.navbar). This is to make sure that the navbar is connected with the scrollable area. • Note that scrollable elements must match the ID of the links inside the navbar's list items (<div id="section1"> matches <a href="#section1">). • The optional data-offset attribute specifies the number of pixels to offset from top when calculating the position of scroll. This is useful when you feel that the links inside the navbar changes the active state too soon or too early when jumping to the scrollable elements. Default is 10 pixels.
  • 73. Carousel The Carousel plugin is a component for cycling through elements, like a carousel (slideshow). <div id="myCarousel" class="carousel slide" data-ride="carousel"> <!-- Indicators --> <ol class="carousel-indicators"> <li data-target="#myCarousel" data-slide-to="0" class="active"></li> <li data-target="#myCarousel" data-slide-to="1"></li> <li data-target="#myCarousel" data-slide-to="2"></li> <li data-target="#myCarousel" data-slide-to="3"></li> </ol>
  • 74. <!-- Wrapper for slides --> <div class="carousel-inner" role="listbox"> <div class="item active"> <img src="img_chania.jpg" alt="Chania"> </div> <div class="item"> <img src="img_chania2.jpg" alt="Chania"> </div> <div class="item"> <img src="img_flower.jpg" alt="Flower"> </div> <div class="item"> <img src="img_flower2.jpg" alt="Flower"> </div> </div>
  • 75.  <!-- Left and right controls --> <a class="left carousel-control" href="#myCarousel" role="button" data- slide="prev"> <span class="glyphicon glyphicon-chevron-left" aria- hidden="true"></span> <span class="sr-only">Previous</span> </a> <a class="right carousel-control" href="#myCarousel" role="button" data- slide="next"> <span class="glyphicon glyphicon-chevron-right" aria- hidden="true"></span> <span class="sr-only">Next</span> </a> </div>
  • 76. Affix  The Affix plugin allows an element to become affixed (locked) to an area on the page.  Navigation menus or social icon buttons, to make them "stick" at a specific area while scrolling up and down the page.  The plugin toggles this behavior on and off (changes the value of CSS position from static to fixed), depending on scroll position.