[Udemy] Webdevelopment_bootstrap,templates

Source: Internet
Author: User
Tags cloudflare

Bootstrap Introduction

Bootstrap vs. css, JS

Just like ppt template relative to PPT

Plainly, the predecessors have done a lot of templates (pre-build), you can directly take doctrine

Bootstarp 4

Ways to use it

1. Download

You'll see a bunch of files

Bootstarp.min.css means they is minified

2. CDN (Content Delivery Network)

We can directly copy this code into index.html

Because JS would is read after CSS, it is put in the bottom of body part

1<! DOCTYPE html>234<title>Bootstrap</title>5<link rel= "stylesheet" href= "Https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity= "Sha384-gn5384xqq1aowxa+058rxpxpg6fy4iwvtnh0e263xmfcjlsawiggfaw/dais6jxm" crossorigin= "Anonymous" >6 78<body>9<script src= "Https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity= "sha384-kj3o2dktikvyik3uenzmm7kckrr/ Re9/qpg6aazgjwfdmvna/gpgff93hxpg5kkn "crossorigin=" Anonymous "></script>Ten<script src= "Https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity= " sha384-apnbgh9b+y1qktv3rn7w3mgpxhu9k/scqsap7huibx39j7fakfpskvxusvfa0b4q "crossorigin=" Anonymous "></script > One<script src= "Https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity= " Sha384-jzr6spejh4u02d8jot6vlehfe/jqgirrsqqxsffwpi1mquvdayjuar5+76pvcmyl "crossorigin=" Anonymous "></script > A</body> -

Next step,

If we would like to add Navbar in our website

Copy the code into your HTML file directly

1<! DOCTYPE html>234<title>Bootstrap</title>5<link rel= "stylesheet" href= "Https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity= "Sha384-gn5384xqq1aowxa+058rxpxpg6fy4iwvtnh0e263xmfcjlsawiggfaw/dais6jxm" crossorigin= "Anonymous" >6 78<body>9 Ten<navclass= "NavBar navbar-expand-lg navbar-light bg-light" > One<aclass= "Navbar-brand" href= "#" >Navbar</a> A<buttonclass= "Navbar-toggler" type= "button" data-toggle= "Collapse" data-target= "#navbarSupportedContent" aria-controls= " Navbarsupportedcontent "aria-expanded=" false "aria-label=" Toggle navigation "> -<spanclass= "Navbar-toggler-icon" ></span> -</button> the  -<divclass= "Collapse Navbar-collapse" id= "Navbarsupportedcontent" > -<ulclass= "Navbar-nav Mr-auto" > -<liclass= "Nav-item Active" > +<aclass= "Nav-link" href= "#" >home <spanclass= "Sr-only" > (current) </span></a> -</li> +<liclass= "Nav-item" > A<aclass= "Nav-link" href= "#" >Link</a> at</li> -<liclass= "Nav-item dropdown" > -<aclass= "Nav-link Dropdown-toggle" href= "#" id= "Navbardropdown" role= "button" data-toggle= "dropdown" aria-haspopup= "true" Aria-expanded= "false" > - Dropdown -</a> -<divclass= "Dropdown-menu" aria-labelledby= "Navbardropdown" > in<aclass= "Dropdown-item" href= "#" >Action</a> -<aclass= "Dropdown-item" href= "#" >another action</a> to<divclass= "Dropdown-divider" ></div> +<aclass= "Dropdown-item" href= "#" >somethingElseHere</a> -</div> the</li> *<liclass= "Nav-item" > $<aclass= "Nav-link Disabled" href= "#" >Disabled</a>Panax Notoginseng</li> -</ul> the<formclass= "Form-inline my-2 my-lg-0" > +<inputclass= "Form-control mr-sm-2" type= "search" placeholder= "search" aria-label= "search" > A<buttonclass= "Btn btn-outline-success my-2 my-sm-0" type= "Submit" >Search</button> the</form> +</div> -</nav> $<script src= "Https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity= "sha384-kj3o2dktikvyik3uenzmm7kckrr/ Re9/qpg6aazgjwfdmvna/gpgff93hxpg5kkn "crossorigin=" Anonymous "></script> $<script src= "Https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity= " sha384-apnbgh9b+y1qktv3rn7w3mgpxhu9k/scqsap7huibx39j7fakfpskvxusvfa0b4q "crossorigin=" Anonymous "></script > -<script src= "Https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity= " Sha384-jzr6spejh4u02d8jot6vlehfe/jqgirrsqqxsffwpi1mquvdayjuar5+76pvcmyl "crossorigin=" Anonymous "></script > -</body> the

Then beautiful Navbar is shown

Use the same step,

We can add jumbotron [' d?? Mb?utr?n] N. The big screen of the TV

and modal

Notice that's when we click the button

We have a own modal, which proves this is JS

How can we add our own custom look?

For example, I would like-to-change Launch demo modal button ' s color

We can search buttons code, and edit the Launch demo modal' s button code

Or we can change it in the Style.css file

. btn-success{    background-color:orange;

Bootstrap

[Udemy] Webdevelopment_bootstrap,templates

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.