0
点赞
收藏
分享

微信扫一扫

[Web]如何利用Boostrap框架搭建一个还可以的静态网站(三_主页)

Alex富贵 2023-07-13 阅读 11


文章目录

  • 返回总结
  • 整体效果
  • 思路
  • 各个组件代码
  • 导航栏
  • LOGO
  • 滚动时间
  • 标题线
  • 图词模块
  • 页脚
  • 代码
  • 独属css文件 indexCss1.css
  • html代码 index.html

返回总结

如何利用Boostrap框架搭建一个还可以的静态网站

整体效果

[Web]如何利用Boostrap框架搭建一个还可以的静态网站(三_主页)_html

[Web]如何利用Boostrap框架搭建一个还可以的静态网站(三_主页)_ico_02

[Web]如何利用Boostrap框架搭建一个还可以的静态网站(三_主页)_css_03

思路

我们很显然采用一头 一尾 中间三分的结构,给出适度的余白

各个组件代码

导航栏

[Web]如何利用Boostrap框架搭建一个还可以的静态网站(三_主页)_html_04

<header>
			<div>
				<nav class="navbar navbar-default col-lg-12" id="_header_MainScreen">
					<div class="container-fluid">
						<!-- Brand and toggle get grouped for better mobile display -->
						<div class="navbar-header">
							<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"
							 aria-expanded="false">
								<span class="sr-only">Toggle navigation</span>
								<span class="icon-bar"></span>
								<span class="icon-bar"></span>
								<span class="icon-bar"></span>
							</button>
							<div id="" class="AUTO_center"><a class="navbar-brand" href="#"><img src="img/logo.png"></a></div>
						</div>

						<!-- Collect the nav links, forms, and other content for toggling -->
						<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
							<ul class="nav navbar-nav">
								<li><a href="index.html"  class="font_style_150-withe-txt">主站 <span class="sr-only">(current)</span></a></li>
								<li><a href="SmokeNote.html"  class="font_style_150-withe-txt">戒烟说</a></li>
								<li><a href="HairLossGuide.html"  class="font_style_150-withe-txt">脱发指南</a></li>
								<li><a href="ElectronicCigarettes.html"  class="font_style_150-withe-txt">电子烟评鉴</a></li>
								<li><a href="register.html"  class="font_style_150-withe-txt">加入我们</a></li>
							</ul>
							<form class="navbar-form navbar-left">
								<div class="form-group">
									<input type="text" class="form-control" placeholder="Search">
								</div>
								<button type="submit" class="btn btn-default">百度一下</button>
							</form>
							<ul class="nav navbar-nav navbar-right">
								<li><a href="#"  class="font_style_150-withe-txt">登入</a></li>
								<!-- <li><a href="#"><img src="img/logo/tg_100x31.png" ></a></li>-->
							</ul>
						</div><!-- /.navbar-collapse -->
					</div><!-- /.container-fluid -->
				</nav>
			</div>
		</header>

css

.font_style_150-withe-txt{
	font-size: 150%;
	color: white;
}

LOGO

[Web]如何利用Boostrap框架搭建一个还可以的静态网站(三_主页)_ico_05

<banner>
			<div class="jumbotron color_MianColor" id="_banner_jumbotron">
				<div id="_Main_title_logo" class="bounceInRight animated">
					<img src="img/_Main_Tiele.png">
				</div>
				
				<br/>
				

		</banner>

css

.color_MianColor{
	background-color: #ffdeeb;
}

#_banner_jumbotron{
	max-height: 200px;
	background-image:url(../img/Main_bg_PC_0607PM.png)
}

#_Main_title_logo{
	padding-left: 5%;
}

.font_date{
	font-size: 250%!important;
	font-family: 黑体;
	color: black;
}

滚动时间

[Web]如何利用Boostrap框架搭建一个还可以的静态网站(三_主页)_前端_06

<marquee behavior="" direction="right"><p id="timeOrder" class="font_date bounceInLeft animated"></p></marquee>

css

$(window).bind("load", function ()
		{
			function getDate()
			{
			var time = new Date();
			var year = time.getFullYear();
			var month = time.getMonth()+1;
			var day = time.getDate();
			var time_H = time.getHours();			
			var time_M = time.getMinutes();
			var time_S = time.getSeconds();
			var time_flag;
			var time_xq = time.getDay();
			if(time_xq==1) time_xq='一';
			if(time_xq==2) time_xq='二';
			if(time_xq==3) time_xq='三';
			if(time_xq==4) time_xq='四';
			if(time_xq==5) time_xq='五';
			if(time_xq==6) time_xq='六';
			if(time_xq==7) time_xq='七';
				
			if(time_H<=12) time_flag="am";else time_flag="pm";
			
			var str = year+"年"+month+"月"+day+"日"+"星期"+time_xq+time_H+":"+time_M+":"+time_S+time_flag;
			$("#timeOrder").html(str);
			}
				
				
			setInterval(getDate,"1000");
})

标题线

[Web]如何利用Boostrap框架搭建一个还可以的静态网站(三_主页)_前端_07

<div id="" class="row">
					
					<div id="" class="col-lg-2"></div>
					<div id="" class="col-lg-8">
						<img src="img/logo/戒烟说.png" class="up10px">
						<b class="banner_secoend_hr_Header-font-style">戒烟说</b>
						<img src="img/logo/火.png">
						<b class="banner_secoend_hr_Txt-font-style">阅读是请教他人的过往,最佳的行程</b>
						<br />
						<hr />
					</div>
					<div id="" class="col-lg-2"></div>
				</div>

css

.banner_secoend_hr_Header-font-style{
	font-size: 250%;
	font-family: "黑体";
	color:black;
}

图词模块

[Web]如何利用Boostrap框架搭建一个还可以的静态网站(三_主页)_css_08

<div class="col-sm-4 col-md-4">
								<div class="thumbnail">
									<img src="img/banner_imgs/1.jpg" alt="...">
									<div class="caption">
										<h3>回响</h3>
										<p><a href="#" class="btn btn-primary" role="button">即刻阅读</a></p>
									</div>
								</div>
							</div>

页脚

[Web]如何利用Boostrap框架搭建一个还可以的静态网站(三_主页)_css_09

#footer_Info{
	padding: 0px;
	margin: 0px;
}

.color_footer{
	background-color: #222222;
}

.font_style_150-withe-txt{
	font-size: 150%;
	color: white;
}

代码

独属css文件 indexCss1.css

*{
	padding:0px;margin:0px;
}
html,body{
	width: 100%;height: 100%;
	background: #f6f9fa;
}

hr{
	border: none;
	background-color:#444444;
	height: 2px;
}

img{
	
}

#_mian_style{
	width: 80%;
	margin-top: 5%;
	margin-bottom: 5%;
}
#_mian_screenCore{
	height: 1200px;
	width: 80%;
	border-radius: 5px;
	border: 2px solid;
	margin: 0 auto;
	margin-top: 5%;
	margin-bottom: 5%;
	text-decoration: none; 
}
#_header_MainScreen{
	max-height: 200px;
	background-image: url(../img/Main_bg_PC_0607PM.png);
	padding: 0px;
	margin: 0px;
	text-decoration: none; 
}
#_banner_jumbotron{
	max-height: 200px;
	background-image:url(../img/Main_bg_PC_0607PM.png)
}
#footer_Info{
	padding: 0px;
	margin: 0px;
}

.color_MianColor{
	background-color: #ffdeeb;
}

.color_footer{
	background-color: #222222;
}

.AUTO_center{
	margin: 0 auto;
}

.font_head{
	color: red;
	font-family: "黑体";
}
.font_txt{
	font-size: 30px;
	color: #111111;
}
._main_new_img{
	height: 200px;
	width:300px;
	box-shadow: 5px 5px 5px;
	border-radius: 10px;
}
#_Main_title_logo{
	padding-left: 5%;
	
}

#banner_word_img{
	min-height: 700px;	
	
	background-image:url(../img/banner_imgs/banner_word_bg_600X900.jpg)
}

.style_autoIMG{
	width: 100%;
	height: 100%;
}

.banner_secoend_hr_Header-font-style{
	font-size: 250%;
	font-family: "黑体";
	color:black;
}
.banner_secoend_hr_Txt-font-style{
	font-size: 90%;
	font-family: "黑体";
}

.up10px{
	margin-top:-10px;
}

.font_zhenjing{
	font-size: 320%;
	font-family: "黑体";
	color: red;
}
.space_lr_50px{
	width: 50px;
	height: 50px;
}
.space_ud_style_5{
	margin-top: 5%;
	margin-bottom: 5%;
}
.space_ud_style_1{
	margin-top: 1%;
	margin-bottom: 1%;
}
#_main_news_1_img{
	background-image: url(../img/_mian_new_1_570x357.png);
	min-height: 250px;
	height: 100%;
}
#_main_news_2_img{
	background-image: url(../img/_mian_new_2_570x338.png);
	min-height: 250px;
	height: 100%;
}
#_main_news_3_img{
	background-image: url(../img/_mian_new_3_570x300.png);
	min-height: 250px;
	height: 100%;
}
._main_news_blockStyle{
	border-radius: 5px;
	border: 2px solid #000000;
	margin-bottom: 50px;
	min-height: 260px;
	box-shadow: 10px 10px 5px #888888;
}
#advertising_img{
	background-image: url(../img/adversting/adversting_1_1700X144.png);
	min-height: 144px;
	min-width: 500px;	
}

#advertising_lastBanner_img{
	background-image: url(../img/adversting/adversting_changpai_1750X745.png);
	min-height: 750px;
	min-width: 500px;	
}
.border_right_solid-2-black{
	border-right: solid 2px #000000;
}
.font_style_150-withe-txt{
	font-size: 150%;
	color: white;
}

.bg-pan-right {
	-webkit-animation: bg-pan-right 8s both;
	        animation: bg-pan-right 8s both;
}

html代码 index.html


举报

相关推荐

0 条评论