Bootstrap 1
Bootstrap 1
=============================
- A component means a web template that contains
a) presentation
b) styles
b) logic
- Presentation is designed in HTML
- Styles are defined with CSS.
- Logic by using script [JavaScript, TypeScript]
- There are various component libraries for web development
a) Bootstrap
b) Twitter Bootstrap
c) React Material
d) Angular Material
e) Telerik
f) DevExpress
g) jQuery UI etc..
Bootstrap
=======
- It is a component library.
- It is free and open source.
- It is cross platform
- It also provide premium service.
"www.getbootstrap.com;
- It provides
a) HTML code snippets [presentation]
b) CSS classes [styles]
c) jQuery Attributes [functionality]
</div>
3. Install jQuery
> npm install jquery --save
<script src="../node_modules/jquery/dist/jquery.js"></script>
<script
src="../node_modules/bootstrap/dist/js/bootstrap.bundle.js"></script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap Demo</title>
<link rel="stylesheet"
href="../node_modules/bootstrap/dist/css/bootstrap.css">
<link rel="stylesheet"
href="../node_modules/bootstrap-icons/font/bootstrap-icons.css">
</head>
<body>
<h2 class="bg-danger border border-4 border-white text-center text-white p-3
rounded rounded-4">Bootstrap</h2>
<p>UI Design Components</p>
<script src="../node_modules/jquery/dist/jquery.js"></script>
<script
src="../node_modules/bootstrap/dist/js/bootstrap.bundle.js"></script>
</body>
</html>
Bootstrap Layout
==============
1. Containers
.container
.container-sm
.container-lg
.container-xl
.container-md
.container-fluid
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap Demo</title>
<link rel="stylesheet"
href="../node_modules/bootstrap/dist/css/bootstrap.css">
<link rel="stylesheet"
href="../node_modules/bootstrap-icons/font/bootstrap-icons.css">
<style>
.container-fluid{
border:2px solid red;
}
</style>
</head>
<body class="container-fluid">
<h2>Bootstrap</h2>
<p>UI Design Components</p>
<script src="../node_modules/jquery/dist/jquery.js"></script>
<script
src="../node_modules/bootstrap/dist/js/bootstrap.bundle.js"></script>
</body>
</html>
2. Box Model
Margins
=======
.m margin
{s} left
{e} right
{t} top
{b} bottom
.ms
.me
.mt
.mb
-{1 to 4}
.ms-4
.mt-4
.mb-3
Padding
======
.p
.p{s,e,t,b}
.p{s,e,t,b}-{1 to 4}
.pt-2
<h2 class="mt-2 mb-4 ms-4">Bootstrap</h2>
<p class="ms-4 ps-4 pt-4 pb-3 border border-primary ">UI Design
Components</p>