Bootstrap项目实战之首页内容介绍全

本节课第一节我们轮播图的下方,设计一个内容介绍,内容介绍分两部分,本次为上半部分。

一.首页内容介绍

rush:xhtml;"> //关于上节课轮播图,手册上其实有一个更好的方案,并不需要通过额外的代码控制。

<a href="#myCarousel" data-slide="prev" class="carousel-control left"> <span class="glyphicon glyphicon-chevron-left">
<a href="#myCarousel" data-slide="next" class="carousel-controlright"> <span class="glyphicon glyphicon-chevron-right">
//内容介绍上

rush:xhtml;">

其他:知名企业家、管理学大师联合编写的具有实现性教材!

heading">师资力量

其他:美国哈佛、耶鲁等世界一流高校、享有声誉的名牌专家!

其他:保证正常的上课效率、制定一张时间表、当天的任务当天完成!

<h4 class="media-heading">服务团队
<p class="text-muted">
其他:社会招聘的、服务水平参差不齐的普通员工!

其他:内部培养、经受过良好高端服务培训的高标准员工!

对应的 CSS 部分

<div class="jb51code">
<pre class="brush:css;">
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;
}

/ 小屏幕(平板,大于等于 768px) /
@media (min-width: 768px) {
.tab-h2 {
font-size: 26px;
}
.tab-p {
font-size: 16px;
}
}

/ 中等屏幕(桌面显示器,大于等于 992px) /
@media (min-width: 992px) {
.tab-h2 {
font-size: 28px;
}
.tab-p {
font-size: 17px;
}
}

/ 大屏幕(大桌面显示器,大于等于 1200px) /
@media (min-width: 1200px) {
.tab-h2 {
font-size: 30px;
}
.tab-p {
font-size: 18px;
}
}

现在我们制作一下首页内容介绍的下半部分。

一.首页内容介绍

先完成底部的 footer

rush:xhtml;">

底部 CSS

rush:css;"> #footer { padding: 20px; text-align: center; background-color: #eee; border-top: 1px solid #ccc; } //两段内容
rush:css;">
强大的学习体系

经过管理学大师层层把关、让您的企业突飞猛进。

<div class="tab3">
<div class="container">
<div class="row">
<div class="col-md-6 col-sm-6">
<img src="img/tab3.png" alt="" class="auto
img-responsive center-block">

完美的管理方式

最新的管理培训方案,让您的企业赶超同行。

CSS 部分

rush:css;"> .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; }

/ 小屏幕(平板,大于等于 768px) /
@media (min-width: 768px) {
.text h3 {

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

/ 中等屏幕(桌面显示器,大于等于 992px) /
@media (min-width: 992px) {
.text h3 {
font-size: 24px;
}
.text p {
font-size: 16px;
}
.tab2-text {
float: left;
}
.tab2-img {
float: right;
}
}

/ 大屏幕(大桌面显示器,大于等于 1200px) /
@media (min-width: 1200px) {
.text h2 {
font-size: 26px;
}
.text p {
font-size: 18px;
}
.tab2-text {
float: left;
}
.tab2-img {
float: right;
}
}

JS 控制垂直居中

rush:js;"> $('.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');
});

如果大家还想深入学习,可以点击进行学习,再为大家附3个精彩的专题:

以上就是Bootstrap首页内容介绍的全部内容,希望大家喜欢,之后还会有更多精彩的内容呈现,不要错过。

Bootstrap内容介绍Bootstrap首页内容Bootstrap首页内容介绍

相关文章

Bootstrip HTML 查询搜索常用格式模版 &lt;form class=&...
如何在按钮上加红色数字 您可以使用Bootstrap的badge组件来在...
要让两个按钮左右排列,你可以使用 Bootstrap 的网格系统将它...
是的,可以将status设置为布尔类型,这样可以在前端使用复选...
前端工程师一般用的是Bootstrap的框架而不是样式,样式一般自...
起步导入:<linkrel="stylesheet"href="b...