Bootstrap, from Twitter, is the most popular front-end framework at present. Bootstrap is based on HTML, CSS, and JAVASCRIPT. It is simple and flexible, making web development faster. Let me tell you the key points of learning.
Key points for learning:
1. Giant screen component
2. Header component
3. Thumbnail component
4. Warning box component
In this lesson, we will mainly learn about the four component functions of Bootstrap: giant screen component, header component, thumbnail component and warning box component.
one. Giant screen component
The giant screen component is mainly a key area of the website.
//In a fixed range, there are rounded corners<div class="container"> <div class="jumbotron"> <h2>Website title</h2> <p> This is a learning website! </p> <p> <a href="#" class="btn btn-default">More content</a></p> </div> </div> //100% full screen, no rounded corners<div class="jumbotron"> <div class="container"> <h2>Website title</h2> <p> This is a learning website! </p> <p> <a href="#" class="btn btn-default">More content</a></p> </div> </div>
two. Header component
//Add some space<div class="page-header"> <h1>Big title <small>subtitle</small></h1> </div>
three. Thumbnail component
//Thumbnail image and responsive<div class="container"> <div class="row"> <div class="col-xs-6 col-md-3 col-sm-4"> <div class="thumbnail"> <img src="img/" alt=""> </div> </div> <div class="col-xs-6 col-md-3 col-sm-4"> <div class="thumbnail"> <img src="img/" alt=""> </div> </div> <div class="col-xs-6 col-md-3 col-sm-4"> <div class="thumbnail"> <img src="img/" alt=""> </div> </div> <div class="col-xs-6 col-md-3 col-sm-4"> <div class="thumbnail"> <img src="img/" alt=""> </div> </div> </div> </div> //Custom content<div class="container"> <div class="row"> <div class="col-xs-6 col-md-3 col-sm-4"> <div class="thumbnail"> <img src="img/" alt=""> <div class="caption"> <h3>Pictures and texts are both rich</h3> <p> This is a thumbnail of pictures combined with text </p> <p> <a href="#" class="btn btn-default">Enter</a></p> </div> </div> </div> <div class="col-xs-6 col-md-3 col-sm-4"> <div class="thumbnail"> <img src="img/" alt=""> <div class="caption"> <h3>Pictures and texts are both rich</h3> <p> This is a thumbnail of pictures combined with text </p> <p> <a href="#" class="btn btn-default">Enter</a></p> </div> </div> </div> <div class="col-xs-6 col-md-3 col-sm-4"> <div class="thumbnail"> <img src="img/" alt=""> <div class="caption"> <h3>Pictures and texts are both rich</h3> <p> This is a thumbnail of pictures combined with text </p> <p> <a href="#" class="btn btn-default">Enter</a></p> </div> </div> </div> <div class="col-xs-6 col-md-3 col-sm-4"> <div class="thumbnail"> <img src="img/" alt=""> <div class="caption"> <h3>Pictures and texts are both rich</h3> <p> This is a thumbnail of pictures combined with text </p> <p> <a href="#" class="btn btn-default">Enter</a></p> </div> </div> </div> </div> </div>
Four. Warning box component
The warning box component is a set of predefined messages.
//Basic warning box<div class="alert alert-success">Bootstrap</div> <div class="alert alert-info">Bootstrap</div> <div class="alert alert-warning">Bootstrap</div> <div class="alert alert-danger">Bootstrap</div> //Warning box with closed<div class="alert alert-success"> Bootstrap <button type="button" class="close" data-dismiss="alert"> <span>&times;</span> </button> </div> //Automatically adapted hyperlink<div class="alert alert-success"> Bootstrap,Please go to the official website <a href="#" class="alert-link">Download</a></div>
The above content is the Big Screen Header Thumbnail and Warning Box Component Chapter 10 of the BootStrap Component, which I introduced to you. I hope it will be helpful to you!