SoFunction
Updated on 2025-02-28

Introduction to the homepage of the Bootstrap project practice (full)

In the first part of this lesson, we design a content introduction below the carousel picture. The content introduction is divided into two parts, this time is the upper half.

one. Home page content introduction

// Regarding the carousel diagram of the last class, there is actually a better solution in the manual, and it does not require additional code control.
<a href="#myCarousel" data-slide="prev" class="carousel-control left"> <span class="glyphicon glyphicon-chevron-left"></span> </a>
<a href="#myCarousel" data-slide="next" class="carousel-controlright"> <span class="glyphicon glyphicon-chevron-right"></span> </a>
//Introduction
<div class="tab1">
 <div class="container">
 <h2 class="tab-h2">「 Why choose Piaocheng Enterprise Training 」</h2>
 <p class="tab-p">
  Strong teaching staff,Perfect practical management course,Let your business achieve a qualitative takeoff!
 </p>
 <div class="row">
  <div class="col-md-6 col">
  <div class="media">
   <div class="media-left media-top">
   <a href="#"> <img class="media-object"
   src="img/" alt="..."> </a>
   </div>
   <div class="media-body">
   <h4 class="media-heading">Course content</h4>
   <p class="text-muted">
    other:Written by unknown lecturers in colleges and universities,Textbooks with no practical value!
   </p>
   <p>
    other:Well-known entrepreneur、Realistic textbooks jointly compiled by management masters!
   </p>
   </div>
  </div>

  </div>
  <div class="col-md-6 col">
  <div class="media">
   <div class="media-left media-top">
   <a href="#"> <img class="media-object"
   src="img/" alt="..."> </a>
   </div>
   <div class="media-body">
   <h4 class="media-heading">Faculty</h4>
   <p class="text-muted">
    other:Not a genuine European and American university graduate、Instructors who are not well-known in the industry!
   </p>
   <p>
    other:Harvard, USA、World-class universities such as Yale、A well-known brand expert!
   </p>
   </div>
  </div>
  </div>
  <div class="col-md-6 col">
  <div class="media">
   <div class="media-left media-top">
   <a href="#"> <img class="media-object"
   src="img/" alt="..."> </a>
   </div>
   <div class="media-body">
   <h4 class="media-heading">Class schedule</h4>
   <p class="text-muted">
    other:Can't guarantee the efficiency of class、No timetable,The task cannot be completed!
   </p>
   <p>
    other:Ensure normal class efficiency、Make a schedule、The task of the day was completed on the same day!
   </p>
   </div>
  </div>
  </div>
  <div class="col-md-6 col">
  <div class="media">
   <div class="media-left media-top">
   <a href="#"> <img class="media-object"
   src="img/" alt="..."> </a>
   </div>
   <div class="media-body">

   <h4 class="media-heading">Service Team</h4>
   <p class="text-muted">
    other:Social recruitment、Ordinary employees with uneven service levels!
   </p>
   <p>
    other:Internal cultivation、High standards of employees who have received good high-end service training!
   </p>
   </div>
  </div>
  </div>
 </div>
 </div>
</div>

The corresponding CSS part

body {
 font-family: "Helvetica Neue", Helvetica, Arial, "Microsoft YaheiUI", "Microsoft YaHei", SimHei, "\5B8B\4F53", simsun, sans-serif;
}

.tab-h2 {
 font-size: 20px;
 color: #0059B2;
 text-align: center;
 letter-spacing: 1px;
}
.tab-p {
 font-size: 15px;
 color: #999;
 text-align: center;
 letter-spacing: 1px;
 margin: 20px 0 40px 0;
}

.tab1 {
 margin: 30px 0;
 color: #666;
}
.tab1 .media-heading {
 margin: 5px 0 20px 0;
}
.tab1 .text-muted {
 color: #999;
 text-decoration: line-through;
}
.tab1 .media-heading {

 margin: 5px 0 20px 0;
}
.tab1 .text-muted {
 color: #999;
 text-decoration: line-through;
}
.tab1 .col {
 padding: 20px;
}

/* Small screen (flat panel, greater than or equal to 768px) */
@media (min-width: 768px) {
 .tab-h2 {
 font-size: 26px;
 }
 .tab-p {
 font-size: 16px;
 }
}

/* Medium screen (desktop display, greater than or equal to 992px) */
@media (min-width: 992px) {
 .tab-h2 {
 font-size: 28px;
 }
 .tab-p {
 font-size: 17px;
 }
}

/* Large screen (large desktop monitor, greater than or equal to 1200px) */
@media (min-width: 1200px) {
 .tab-h2 {
 font-size: 30px;
 }
 .tab-p {
 font-size: 18px;
 }
}

Now let’s create the second half of the homepage content introduction.

one. Home page content introduction
Complete the footer at the bottom first

<footer  class="text-muted">
 <div class="container">
 <p>
  Corporate training | Cooperation matters | Copyright Complaint
 </p>
 <p>
  Su ICP Prepare 12345678. © 2009-2016 Piaocheng Enterprise Training Network. Powered by
  Bootstrap.
 </p>
 </div>
</footer>

Bottom CSS

#footer {
 padding: 20px;
 text-align: center;
 background-color: #eee;
 border-top: 1px solid #ccc;
}
//Two paragraphs
<div class="tab2">
 <div class="container">
 <div class="row">
  <div class="col-md-6 col-sm-6 tab2-img">
  <img src="img/" alt="" class="auto
  img-responsive center-block">
  </div>
  <div class="text col-md-6 col-sm-6 tab2-text">
  <h3>A strong learning system</h3>
  <p>
   After layers of management masters、Make your business progress by leaps and bounds。
  </p>
  </div>
 </div>
 </div>
</div>

<div class="tab3">
 <div class="container">
 <div class="row">
  <div class="col-md-6 col-sm-6">
  <img src="img/" alt="" class="auto
  img-responsive center-block">
  </div>
  <div class="text col-md-6 col-sm-6">
  <h3>Perfect management method</h3>
  <p>
   Latest management training program,Let your business surpass your peers。
  </p>
  </div>
 </div>
 </div>
</div>

CSS section

.tab2 {
 background: #eee;
 padding: 60px 20px;
 text-align: center;
}
.tab2 img {
 width: 40%;
 height: 40%;
}
.tab3 {
 padding: 40px 0;
 text-align: center;
}
.tab3 img {
 width: 65%;
 height: 65%;
}
.text h3 {
 font-size: 20px;
}
.text p {
 font-size: 14px;
}

/* Small screen (flat panel, greater than or equal to 768px) */
@media (min-width: 768px) {
 .text h3 {

 font-size: 22px;
 }
 .text p {
 font-size: 15px;
 }
 .tab2-text {
 float: left;
 }
 .tab2-img {
 float: right;
 }
}

/* Medium screen (desktop display, greater than or equal to 992px) */
@media (min-width: 992px) {
 .text h3 {
 font-size: 24px;
 }
 .text p {
 font-size: 16px;
 }
 .tab2-text {
 float: left;
 }
 .tab2-img {
 float: right;
 }
}

/* Large screen (large desktop monitor, greater than or equal to 1200px) */
@media (min-width: 1200px) {
 .text h2 {
 font-size: 26px;
 }
 .text p {
 font-size: 18px;
 }
 .tab2-text {
 float: left;
 }
 .tab2-img {
 float: right;
 }
}

JS control vertical centering

$('.text').eq(0).css('margin-top', ($('.auto').eq(0).height() - $('.text').eq(0).height()) / 2 + 'px');
$(window).resize(function() {
 $('.text').eq(0).css('margin-top', ($('.auto').eq(0).height() - $('.text').eq(0).height()) / 2 + 'px');
});

$('.text').eq(1).css('margin-top', ($('.auto').eq(1).height() - $('.text').eq(1).height()) / 2 + 'px');
$(window).resize(function() {
 $('.text').eq(1).css('margin-top', ($('.auto').eq(1).height() - $('.text').eq(1).height()) / 2 + 'px');
});

If you want to learn more, you can clickhereLet’s study and attach 3 exciting topics to you:

Bootstrap learning tutorial

Bootstrap practical tutorial

Bootstrap plug-in usage tutorial

The above is all the content introduced on the Bootstrap homepage. I hope you like it. There will be more exciting content presentation in the future. Don’t miss it.