项目实战(一)HTML5+CSS3+JS完成前端网站的制作

2023-10-31

css样式:

*{
	padding:0;
	margin:0;
	box-sizing: border-box;
}
html,body{
	font-family: 'segoe UI',Tahoma,Geneva,verdana,sans-serif;
	line-height: 1.7em;
}
a{
	color: #333;
	text-decoration: none;
}
h1,h2,h3{
	padding-bottom: 20px;
}
p{
	margin: 10px 0;
}
.container{
	margin:0 auto;
	max-width: 1100px;
	overflow: hidden;
	padding: 0 20px;
}
.text-primary{
	color: #f7c08a;
}
.bg-dark{
	background: #444;
	color: #fff;
}
.clr{
	clear: both;
}
.py{
	padding: 10px 0;
}
.l-heading{
	font-size: 40px;
	padding-top: 20px;
}
#navber{
	background: #333;
	color: #fff;
	overflow: auto;
}
#navber a{
	color: #fff;
}
#navber h1{
	float: left;
	padding-top: 20px;
}
#navber ul{
	float: right;
	list-style: none;
}
#navber ul li{
	float: left;
}
#navber ul li a{
	display: block;
	padding: 20px;
	text-align: center;
}
#navber ul li a:hover,
#navber ul li a.current{
	background: #444;
	color: #f7c08a;
}
#showcase{
	background: url('../img/1.jpg') no-repeat center center/cover;
	height: 600px;
}
#showcase .showcase-content{
	color: #fff;
	text-align: center;
	padding-top: 170px;
}
#showcase .showcase-content h1{
	font-size:60px;
	line-height: 1.2em;
}
#showcase .showcase-content p{
	font-size:20px;
	line-height: 1.7em; 
	padding-bottom: 20px;

}
.btn{
	display: inline-block;
	font-size:18px;
	color: #fff;
	background: #333;
	padding: 13px 20px;
	border:none; 
}
.btn:hover{
	background: #f7c08a;
}
.btn-light{
	background: #f4f4f4;
	color: #333;    
}

#home-info{
	height: 400px;
}
#home-info .info-img{
	float: left;
	width: 50%;
	background: url('../img/2.jpg') no-repeat center center/cover;
	height: 100%;
}
#home-info .info-content{
	float: right;
	width: 50%;
	text-align: center;
	height: 100%;
	padding: 50px 30px;
	overflow: hidden;
}
#home-info .info-content p{
	padding-bottom: 30px; 
}

.box{
	float: left;
	width: 33.3%;
	padding: 50px;
	text-align: center;
}
.box i{
	margin-bottom: 10px;
}
.bg-light{
	background: #f4f4f4;
	color: #333;
}
.bg-primary{
	background: #f7c08a;
	color: #333;
}
#about-info .info-left{
	float: left;
	width: 50%;
	height: 100%;
}
#about-info .info-right{
	float: right;
	width: 50%;
	height:100;
}
#about-info .info-right img{
	display: block;
	width: 80%;
	margin: 0 auto;
	border-radius: 50%;

}

#testimonials{
	height: 600px;
	background: url('../img/6.jpg')  no-repeat center center/cover;
	padding-top: 100px;

}
#testimonials h2{
	color: #fff;
	text-align:  center;
	padding-bottom: 40px;
}
#testimonials .testimonial{
	padding: 20px;
	margin-bottom: 40px;
	border-radius: 5px;
	opacity: 0.9;
}
#testimonials .testimonial img{
	width: 100px;
	height: 100px;
	border-radius: 50%;
	float: left;
	margin-right: 20px;
}
#contact-form .form-group{
	margin-right: 20px;
}
#contact-form label{
	display: block;
	margin-bottom: 5px;
}
#contact-form input,
#contact-form textarea{
	width: 100%;
	padding: 10px;
	border: 1px #ddd solid;
}
#contact-form textarea{
	height: 200px;
}
#contact-form input,
#contact-form textarea:focus{
	outline: none;
	border-color: #f7c08a;
}
#main-footer{
	text-align: center;
	background: #333;
	color: #fff;
	padding:20px;
}

制作首页HTML框架:

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width,initial-scale=1.0">
	<meta name="X-UA-Compatible" content="ie=edg">
	<meta name ="description" content="欢迎来到德云社">
	<meta name="keywords" content="413德云社">
	<link rel="stylesheet" href="css/style.css">
	<link rel="stylesheet" href="css/font-awesome.min.css">
	<title>德云社|首页</title>
</head>
<body>
	<header>
		<nav id="navber">
			<div class="container">
				<h1><a href="index.html">德云社</a></h1>
				<ul>
					<li><a href="index.html">首页</a></li>
					<li><a href="about.html">关于我们</a></li>
					<li><a href="album.html">我们的回忆</a></li>
					<li><a href="contact.html">联系我们</a></li>
				</ul>
			</div>
		</nav>
		<div id="showcase">
			<div class="container">
				<div class="showcase-content">
					<h1>欢迎来到<span class="text-primary"> 德云社</span> </h1>
					<p>德云社,带给你的欢乐无限。欢迎您的到来!</p>
					<a class="btn" href="about.html">关于我们</a>
					
				</div>
				
			</div>
			
		</div>
	</header>
	<section id="home-info" class="bg-dark">
		<div class="info-img"></div>
		<div class="info-content">
			<h2><span class="text-primary">德云社</span> 介绍</h2>
			<p>"德云社"是以弘扬中华民族文化、培养曲艺人才、服务大众为主旨的曲艺演出团体。社团最初由著名相声演员刘洋、汤东霖、臧传奇、吴超群于1995年创建,经历了二十五年的风雨历程走到今日实属艰辛,然值得欣慰的是经过哈源先生和众多位新老相声演员的不懈努力,德云社正在逐步走向辉煌。德云社所属的"江苏相声大会"每周都在江苏农林职业技术学院等地演出五、六场。取得这么大的成功都是因为有郭老师的指导帮助。<br /></p>
			<a class="btn btn-light" href="about.html">阅读更多</a>
		</div>
	</section>
	<section id="features">
		<div class="box bg-light">
			<i class="fa fa-users fa-3x"></i>
			<h3>成员介绍</h3>
			<p>德云社演员:<br /> 汤小脸,刘野鸡,哈萨K,超群 <br /> 一刀999,郭班主</p>
		</div>
		<div class="box bg-primary">
			<i class="fa fa-handshake-o fa-3x"></i>
			<h3>商务合作</h3>
			<p>关于相声表演 <br />关于校园演出 <br />关于喜剧演出 </p>
		</div>
		<div class="box bg-light">
			<i class="fa fa-envelope fa-3x"></i>
			<h3>联系我们</h3>
			<p>电话:163524996 <br /> 邮箱:756@163.com <br /> 地址:江苏农林职业技术学院</p>
		</div>
	</section>
	<div class="clr"></div>
	<footer id="main-footer">
		<p>德云社 &copy; 2020, All Rights Reserved</p>
	</footer>
</body>
</html>

附页HTML代码框架:

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width,initial-scale=1.0">
	<meta name="X-UA-Compatible" content="ie=edg">
	<meta name ="description" content="欢迎来到德云社">
	<meta name="keywords" content="413德云社">
	<link rel="stylesheet" href="css/style.css">
	<link rel="stylesheet" href="css/font-awesome.min.css">
	<title>德云社|联系我们</title>
</head>
<body>
	<header>
		<nav id="navber">
			<div class="container">
				<h1><a href="index.html">德云社</a></h1>
				<ul>
					<li><a href="index.html">首页</a></li>
					<li><a href="about.html">关于我们</a></li>
					<li><a href="album.html">我们的回忆</a></li>
					<li><a class="current" href="contact.html">联系我们</a></li>
				</ul>
			</div>
		</nav>
	</header>
	<section id="contact-form" class="py">
		<div class="container">
			<h1 class="l-heading"><span class="text-primary">联系</span>我们</h1>
			<p>如果有疑问请填写以下信息联系我们!</p>
			<form action="process.php">
				<div class="form-group">
					<label for="name">姓名</label>
			   <input type="text" name="name" id="name">
				</div>
				<div class="form-group">
					<label for="email">邮箱</label>
			   <input type="text" name="email" id="email">
				</div>
				<div class="form-group">
					<label for="message">反馈内容</label>
			   <textarea type="text" name="message" id="message"></textarea>
				</div>
				<button type="submit" class="btn">提交</button>
			</form>
		</div>
	</section>
	<section id="contact-info" class="bg-dark">
		<div class="container">
		<div class="box ">
			<i class="fa fa-home fa-3x"></i>
			<h3>联系地址</h3>
			<p>联系地址:江苏农林职业技术学院</p>
		</div>
		<div class="box ">
			<i class="fa fa-phone fa-3x"></i>
			<h3>联系电话</h3>
			<p>电话:+085629356</p>
		</div>
		<div class="box ">
			<i class="fa fa-envelope fa-3x"></i>
			<h3>邮箱</h3>
			<p> 邮箱:756@163.com</p>
		</div>
		</div>
	</section>
	<footer id="main-footer">
		<p>德云社 &copy; 2020, All Rights Reserved</p>
	</footer>
</body>
</html>

附页HTML框架:

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width,initial-scale=1.0">
	<meta name="X-UA-Compatible" content="ie=edg">
	<meta name ="description" content="欢迎来到德云社">
	<meta name="keywords" content="413德云社">
	<link rel="stylesheet" href="css/style.css">
	<title>德云社| 关于我们</title>
</head>
<body>
	<header>
		<nav id="navber">
			<div class="container">
				<h1><a href="index.html">德云社</a></h1>
				<ul>
					<li><a href="index.html">首页</a></li>
					<li><a class="current" href="about.html">关于我们</a></li>
					<li><a href="album.html">我们的回忆</a></li>
					<li><a href="contact.html">联系我们</a></li>
				</ul>
			</div>
		</nav>
	</header>
		<section id="about-info" class="py bg-light">
			<div class="container">
			  <div class="info-left">
			  	<h1 class="l-heading">关于<span class="text-primary">德云社</span></h1>
			  	<p>暂且不提最近因为《庆余年》频繁上热搜的郭麒麟少班主。张九龄恋情也出现在了热搜榜单上,德云社的相声演员连狗仔都安排上了,谁看了不得说句佩服呢!<br />除此之外德云社 票的话题更是两次登上热搜,有时候简简单单的德云社三个字就可以在热搜榜单上占据一席之位。</p>

			  </div>
			 <div class="info-right">
			 	<img src="./img/3.jpg" alt="德云社">
			 </div>
			</div>
		</section>
		<section id="testimonials">
			<div class="container">
				<h2 class="l-heading"> 网友评价</h2>
				<div class="testimonial bg-primary">
					<img src="./img/4.jpg" alt="jan">
					<p>最近超级喜欢德云社,了解了里面的人之后,觉得他们都是各有特色并朝着各自的方向不断成长的。人也都很好,以前被蒙骗以为德云社很黑暗,了解之后才知道很好。</p>
				</div>
			</div>
			<div class="container">
				<div class="testimonial bg-primary">
					<img src="./img/5.jpg" alt="Amay">
					<p>德云社年成立,但当时说白了就是召集了一伙说相声的组队找观众。2005年初具规模,之后10年渐火。德云社的这十年,也是很多人认识相声并喜爱他的十年。之前除了侯宝林,马季,马三立老先生和姜昆,冯巩等非专业相声演员观众很少知道其它人.</p>
				</div>
			</div>
			<div class="container">
				<div class="testimonial bg-primary">
					<img src="./img/7.jpg" alt="zhang">
					<p>德云社演员独特的个性和相声表演手法满足了很多人的胃口。(以下部分形容词仅代表个人观点)有汤小脸的贱,刘野鸡的憨,哈萨K,一刀999的二人转式表演也有超群的稳重,这些不同风格满足了不同观众的需求,也让更多人喜欢这个曲艺形式。</p>
				</div>
			</div>
		</section>
	<footer id="main-footer">
		<p>德云社 &copy; 2020, All Rights Reserved</p>
	</footer>
</body>
</html>

关于我们的页面HTML和css代码:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>我们的回忆</title> 

<style type="text/css">
*{
	padding:0;
	margin:0;
	box-sizing: border-box;
}
html,body{
	font-family: 'segoe UI',Tahoma,Geneva,verdana,sans-serif;
	line-height: 1.7em;
}
a{
	color: #333;
	text-decoration: none;
}
.container{
	margin:0 auto;
	max-width: 1100px;
	overflow: hidden;
	padding: 0 20px;
}
.text-primary{
	color: #f7c08a;
}
.bg-dark{
	background: #444;
	color: #fff;
}
#navber{
	background: #333;
	color: #fff;
	overflow: auto;
}
#navber a{
	color: #fff;
}
#navber h1{
	float: left;
	padding-top: 20px;
}
#navber ul{
	float: right;
	list-style: none;
}
#navber ul li{
	float: left;
}
#navber ul li a{
	display: block;
	padding: 20px;
	text-align: center;
}
#navber ul li a:hover,
html {
	overflow:hidden; 
	-ms-touch-action:none;
	-ms-content-zooming:none;
}
body {
	position:absolute;
	margin:0px;
	padding:0px;
	background:#fff;
	width:100%;
	height:100%;
}
#canvas {
	position:absolute;
	width:100%;
	height:100%;
	background:#fff;
}
</style>

<script type="text/javascript" src="js/ge1doot.js"></script>
<script type="text/javascript">

"use strict";

(function () {
	/* ==== definitions ==== */
	var diapo = [], layers = [], ctx, pointer, scr, camera, light, fps = 0, quality = [1,2],
	// ---- poly constructor ----
	Poly = function (parent, face) {
		this.parent = parent;
		this.ctx    = ctx;
		this.color  = face.fill || false;
		this.points = [];
		if (!face.img) {
			// ---- create points ----
			for (var i = 0; i < 4; i++) {
				this.points[i] = new ge1doot.transform3D.Point(
					parent.pc.x + (face.x[i] * parent.normalZ) + (face.z[i] * parent.normalX),
					parent.pc.y +  face.y[i],
					parent.pc.z + (face.x[i] * parent.normalX) + (-face.z[i] * parent.normalZ)
				);
			}
			this.points[3].next = false;
		}
	},
	// ---- diapo constructor ----
	Diapo = function (path, img, structure) {
		// ---- create image ----
		this.img = new ge1doot.transform3D.Image(
			this, path + img.img, 1, {
				isLoaded: function(img) {
					img.parent.isLoaded = true;
					img.parent.loaded(img);
				}
			}
		);
		this.visible  = false;
		this.normalX  = img.nx;
		this.normalZ  = img.nz;
		// ---- point center ----
		this.pc = new ge1doot.transform3D.Point(img.x, img.y, img.z);
		// ---- target positions ----
		this.tx = img.x + (img.nx * Math.sqrt(camera.focalLength) * 20);
		this.tz = img.z - (img.nz * Math.sqrt(camera.focalLength) * 20);
		// ---- create polygons ----
		this.poly = [];
		for (var i = -1, p; p = structure[++i];) {
			layers[i] = (p.img === true ? 1 : 2);
			this.poly.push(
				new Poly(this, p)
			);
		}
	},
	// ---- init section ----
	init = function (json) {
		// draw poly primitive
		Poly.prototype.drawPoly = ge1doot.transform3D.drawPoly;
		// ---- init screen ----
		scr = new ge1doot.Screen({
			container: "canvas"
		});
		ctx = scr.ctx;
		scr.resize();
		// ---- init pointer ----
		pointer = new ge1doot.Pointer({
			tap: function () {
				if (camera.over) {
					if (camera.over === camera.target.elem) {
						// ---- return to the center ----
						camera.target.x = 0;
						camera.target.z = 0;
						camera.target.elem = false;
					} else {
						// ---- goto diapo ----
						camera.target.elem = camera.over;
						camera.target.x = camera.over.tx;
						camera.target.z = camera.over.tz;
						// ---- adapt tesselation level to distance ----
						for (var i = 0, d; d = diapo[i++];) {
							var dx = camera.target.x - d.pc.x;
							var dz = camera.target.z - d.pc.z;
							var dist = Math.sqrt(dx * dx + dz * dz);
							var lev = (dist > 1500) ? quality[0] : quality[1];
							d.img.setLevel(lev);
						}
					}
				}
			}
		});
		// ---- init camera ----
		camera = new ge1doot.transform3D.Camera({
			focalLength: Math.sqrt(scr.width) * 10,
			easeTranslation: 0.025,
			easeRotation: 0.06,
			disableRz: true
		}, {
			move: function () {
				this.over = false;
				// ---- rotation ----
				if (pointer.isDraging) {
					this.target.elem = false;
					this.target.ry = -pointer.Xi * 0.01;
					this.target.rx = (pointer.Y - scr.height * 0.5) / (scr.height * 0.5);
				} else {
					if (this.target.elem) {
						this.target.ry = Math.atan2(
							this.target.elem.pc.x - this.x,
							this.target.elem.pc.z - this.z
						);
					}
				}
				this.target.rx *= 0.9;
			}
		});
		camera.z  = -10000;
		camera.py = 0;
		// ---- create images ----
		for (var i = 0, img; img = json.imgdata[i++];) {
			diapo.push(
				new Diapo(
					json.options.imagesPath, 
					img, 
					json.structure
				)
			);
		}	
		// ---- start engine ---- >>>
		setInterval(function() {
			quality = (fps > 50) ? [2,3] : [1,2];
			fps = 0;
		}, 1000);
		run();
	},
	// ---- main loop ----
	run = function () {
		// ---- clear screen ----
		ctx.clearRect(0, 0, scr.width, scr.height);
		// ---- camera ----
		camera.move();
		// ---- draw layers ----
		for (var k = -1, l; l = layers[++k];) {
			light = false;
			for (var i = 0, d; d = diapo[i++];) {
				(l === 1 && d.draw()) || 
				(d.visible && d.poly[k].draw());
			}
		}
		// ---- cursor ----
		if (camera.over && !pointer.isDraging) {
			scr.setCursor("pointer");
		} else {
			scr.setCursor("move");
		}
		// ---- loop ----
		fps++;
		requestAnimFrame(run);
	};
	/* ==== prototypes ==== */
	Poly.prototype.draw = function () {
		// ---- color light ----
		var c = this.color;
		if (c.light || !light) {
			var s = c.light ? this.parent.light : 1;
			// ---- rgba color ----
			light = "rgba(" + 
				Math.round(c.r * s) + "," +
				Math.round(c.g * s) + "," + 
				Math.round(c.b * s) + "," + (c.a || 1) + ")";
			ctx.fillStyle = light;
		}
		// ---- paint poly ----
		if (!c.light || this.parent.light < 1) {
			// ---- projection ----
			for (
				var i = 0; 
				this.points[i++].projection();
			);
			this.drawPoly();
			ctx.fill();
		}
	}
	/* ==== image onload ==== */
	Diapo.prototype.loaded = function (img) {
		// ---- create points ----
		var d = [-1,1,1,-1,1,1,-1,-1];
		var w = img.texture.width  * 0.5;
		var h = img.texture.height * 0.5;
		for (var i = 0; i < 4; i++) {
			img.points[i] = new ge1doot.transform3D.Point(
				this.pc.x + (w * this.normalZ * d[i]),
				this.pc.y + (h * d[i + 4]),
				this.pc.z + (w * this.normalX * d[i])
			);
		}
	}
	/* ==== images draw ==== */
	Diapo.prototype.draw = function () {
		// ---- visibility ----
		this.pc.projection();
		if (this.pc.Z > -(camera.focalLength >> 1) && this.img.transform3D(true)) {
			// ---- light ----
			this.light = 0.5 + Math.abs(this.normalZ * camera.cosY - this.normalX * camera.sinY) * 0.6;
			// ---- draw image ----
			this.visible = true;
			this.img.draw();
			// ---- test pointer inside ----
			if (pointer.hasMoved || pointer.isDown) {
				if (
					this.img.isPointerInside(
						pointer.X,
						pointer.Y
					)
				) camera.over = this;
			}
		} else this.visible = false;
		return true;
	}
	return {
		// --- load data ----
		load : function (data) {
			window.addEventListener('load', function () {
				ge1doot.loadJS(
					"js/imageTransform3D.js",
					init, data
				);
			}, false);
		}
	}
})().load({
	imgdata:[
		// north
		{img:'imgs/1.jpg', x:-1000, y:0, z:1500, nx:0, nz:1},
		{img:'imgs/2.jpg', x:0,     y:0, z:1500, nx:0, nz:1},
		{img:'imgs/3.jpg', x:1000,  y:0, z:1500, nx:0, nz:1},
		// east
		{img:'imgs/4.jpg', x:1500,  y:0, z:1000, nx:-1, nz:0},
		{img:'imgs/5.jpg', x:1500,  y:0, z:0, nx:-1, nz:0},
		{img:'imgs/6.jpg', x:1500,  y:0, z:-1000, nx:-1, nz:0},
		// south
		{img:'imgs/7.jpg', x:1000,  y:0, z:-1500, nx:0, nz:-1},
		{img:'imgs/8.jpg', x:0,     y:0, z:-1500, nx:0, nz:-1},
		{img:'imgs/9.jpg', x:-1000, y:0, z:-1500, nx:0, nz:-1},
		// west
		{img:'imgs/10.jpg', x:-1500, y:0, z:-1000, nx:1, nz:0},
		{img:'imgs/11.jpg', x:-1500, y:0, z:0, nx:1, nz:0},
		{img:'imgs/12.jpg', x:-1500, y:0, z:1000, nx:1, nz:0}
	],
	structure:[
		{
			// wall
			fill: {r:255, g:255, b:255, light:1},
			x: [-1001,-490,-490,-1001],
			z: [-500,-500,-500,-500],
			y: [500,500,-500,-500]
		},{
			// wall
			fill: {r:255, g:255, b:255, light:1},
			x: [-501,2,2,-500],
			z: [-500,-500,-500,-500],
			y: [500,500,-500,-500]
		},{
			// wall
			fill: {r:255, g:255, b:255, light:1},
			x: [0,502,502,0],
			z: [-500,-500,-500,-500],
			y: [500,500,-500,-500]
		},{
			// wall
			fill: {r:255, g:255, b:255, light:1},
			x: [490,1002,1002,490],
			z: [-500,-500,-500,-500],
			y: [500,500,-500,-500]
		},{
			// shadow
			fill: {r:0, g:0, b:0, a:0.2},
			x: [-420,420,420,-420],
			z: [-500,-500,-500,-500],
			y: [150, 150,-320,-320]
		},{
			// shadow
			fill: {r:0, g:0, b:0, a:0.2},
			x: [-20,20,20,-20],
			z: [-500,-500,-500,-500],
			y: [250, 250,150,150]
		},{
			// shadow
			fill: {r:0, g:0, b:0, a:0.2},
			x: [-20,20,20,-20],
			z: [-500,-500,-500,-500],
			y: [-320, -320,-500,-500]
		},{
			// shadow
			fill: {r:0, g:0, b:0, a:0.2},
			x: [-20,20,10,-10],
			z: [-500,-500,-100,-100],
			y: [-500, -500,-500,-500]
		},{
			// base
			fill: {r:32, g:32, b:32},
			x: [-50,50,50,-50],
			z: [-150,-150,-50,-50],
			y: [-500,-500,-500,-500]
		},{
			// support
			fill: {r:16, g:16, b:16},
			x: [-10,10,10,-10],
			z: [-100,-100,-100,-100],
			y: [300,300,-500,-500]
		},{
			// frame
			fill: {r:255, g:255, b:255},
			x: [-320,-320,-320,-320],
			z: [0,-20,-20,0],
			y: [-190,-190,190,190]
		},{
			// frame
			fill: {r:255, g:255, b:255},
			x: [320,320,320,320],
			z: [0,-20,-20,0],
			y: [-190,-190,190,190]
		},
		{img:true},
		{
			// ceilingLight
			fill: {r:255, g:128, b:0},
			x: [-50,50,50,-50],
			z: [450,450,550,550],
			y: [500,500,500,500]
		},{
			// groundLight
			fill: {r:255, g:128, b:0},
			x: [-50,50,50,-50],
			z: [450,450,550,550],
			y: [-500,-500,-500,-500]
		}
	],
	options:{
		imagesPath: ""
	}
});
</script>

</head> 
<body>
	<header>
		<nav id="navber">
			<div class="container">
				<h1><a href="index.html">德云社</a></h1>
				<ul>
					<li><a href="index.html">首页</a></li>
					<li><a class="current" href="about.html">关于我们</a></li>
					<li><a href="album.html">我们的回忆</a></li>
					<li><a href="contact.html">联系我们</a></li>
				</ul>
			</div>
		</nav>
	</header>
<div style="text-align:center;clear:both;">
<script src="/gg_bd_ad_720x90.js" type="text/javascript"></script>
<script src="/follow.js" type="text/javascript"></script>
</div>

<canvas id="canvas">你的浏览器不支持HTML5画布技术,请使用谷歌浏览器。</canvas>


</body>
</html>

想学习更多技术获得更多源码欢迎关注我的公众号"码农日常"
在这里插入图片描述

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

项目实战(一)HTML5+CSS3+JS完成前端网站的制作 的相关文章

  • 由于 MIME 类型不受支持,拒绝应用样式

    我不断收到一条错误消息 指出 MIME 类型 text html 不可执行或不是受支持的样式表 MIME 类型 并且启用了严格的 MIME 检查 我的链接代码是
  • 两个 Div 之间的固定宽度间隙

    有谁知道如何修复两个 div 之间的间隙 我有一个主要内容 Div 里面有两个带有图片的 Div 视图的宽度为 768 像素 当我开始拉伸视图时 两张图片开始相互远离 但理想情况下 主要内容 Div 应该在周围有空白的情况下拉伸 并且图片之
  • 通过 JavaScript 检测浏览器换行

    我需要 javascript 来检测每个浏览器包装的文本行并将其包装到 span class line 我读过一些关于测量每个单词的 y 轴的文章 但还没有看到可靠的解决方案 这是我到目前为止所拥有的 看到它Jsfiddle http js
  • 使用纯javascript选择最接近id的id

    div div TEXT div div div div TEXT div div div TEXT div 如何选择最接近div1的div2 关注w3docs https www w3 org TR html4 struct global
  • CSS3 box-shadow 用于类似重叠的 div

    我正在尝试用css3来实现这种效果 HTML 代码显然是这样的
  • PyCharm 中有 HTML 块 {%%} 的快捷方式吗?

    我正在使用 HTML 块 例如 block content 经常使用 但必须输入括号和百分比符号很麻烦 有没有捷径或其他方法可以自动执行此操作 到目前为止我刚刚发现这个 PyCharm 中有插入 的快捷方式吗 https stackover
  • 使用 实现可访问性的更好做法是什么?

    我有一个下载链接 但我找不到任何良好的可访问解决方案来说明如何处理这种情况 我遵循一个共同的经验法则 按钮做事 链接去地方 我的情况是 我有一个触发文档下载的按钮 同一页面 我相信这应该是一个具有按钮角色的锚点 因为它明确不触发重定向或导航
  • 从 Bootstrap 中删除字形

    如何从 bootstrap 3 中删除所有字形实例 看起来它已经大量嵌入到 css 文件中了 我正在努力使文件大小尽可能最小 只需简单地克隆引导程序https github com twbs bootstrap sass https git
  • CSS 中的像素与像素密度

    我对 HTML 和 CSS 非常陌生 我突然想到 当决定某个东西是 5px 时 比如说 由于像素的物理尺寸取决于密度 所以 5px 在 100 ppi 的屏幕上看起来肯定比在 300 ppi 的屏幕上看起来更大ppi 这是正确的吗 如果是
  • 如何重置使用 JavaScript 更改的 CSS 属性?

    我的导航按钮的宽度从 100px 增加到 150px 当鼠标悬停在 nav li hover width 150px 但是使用 javascript 我已经做到了 无论选择哪个选项 宽度都将继续为 150px 当选择每个选项时 它会使其他选
  • 使用 JavaScript 使链接保持活动状态并在单击时显示悬停效果

    I am struggling to make this work I d like to make it where if O F is clicked the hover state stays active if another li
  • 如何设置菜单按钮和菜单项的样式

    我尝试更改菜单按钮中的样式 我可以更改菜单按钮样式 但不能更改其菜单项 无论我尝试什么 菜单按钮内的菜单项都保持不变 menu button fx background color black menu button label fx ba
  • 如何将 Google Charts 与 Vue.js 库一起使用?

    我正在尝试使用 Vue js 库使用 Google Charts 制作图表 但我不知道如何添加到 div 这是我尝试做的 这是如何使用普通 javascript 添加图表 这是文档的代码示例 https developers google
  • 将div设置为隐藏,延时后可见

    我试图在 X 时间后 也许甚至在随机时间之后 但现在我们只做固定时间 在黑色背景上出现一个黄色方块 function initialSetup if document getElementById yellow null document
  • 如何在使用页面锚点导航时设置“激活”类以在 Angular 2 中引导导航栏?

    我正在使用 Angular 2 和 Bootstrap 4 创建一个单页网站 我创建了一个始终位于页面顶部的导航栏组件 并且我正在使用页面锚点导航 id 请注意 我还没有创建路由模块 到目前为止还没有必要这样做 导航栏代码如下
  • 如何阻止破折号自行包裹?

    我有一个标题 标题最后一个单词的末尾是一个破折号 单词和破折号之间没有空格 当浏览器窗口变小时 破折号会中断并换成新行 在自己的行上有一个破折号是不好的排版 如何停止破折号之前的换行 以便最后一个单词运行到新行 这是代码 h1 XYZ co
  • 避免响应式页面的重复内容

    我目前正在做一个涉及响应式设计的项目 整个布局应该使用HTML和CSS来实现 我知道可以使用 java 脚本将内容从一个列布局移动到另一列布局 而无需复制内容 但是使用 HTML 和 CSS 是否可以实现相同的效果 以下面的例子为例 它会在
  • 如何在没有@import的情况下减少@import?

    我用的较少 从 Google PageSpeed 我了解到 使用 importCSS 文件中的内容会影响网站速度 所以我想排除任何 import来自我的 CSS 的东西 我有 2 个不同的样式表reset css and rebuild c
  • 如何获取浏览器视口中当前显示的内容

    如何获取当前正在显示长文档的哪一部分的指示 例如 如果我的 html 包含 1 000 行 1 2 3 9991000 并且用户位于显示第 500 行的中间附近 那么我想得到 500 n501 n502 或类似的内容 显然 大多数场景都会比
  • Schema.org 的常见问题解答页面

    我有一个常见问题解答页面 我想用更好的 html 架构来实现它

随机推荐

  • APP UI自动化测试常见面试题,或许有用呢~

    1 Android APP 内存不足时 如何获得内存 系统优先结束被挂起 暂停 的进程 释放内存 2 APP 测试常见问题有哪些 原因有哪些 常见的有 crash ANR 应用无响应 卡死 一般由设备碎片化 网络波动大 内存泄漏 代码编写错
  • 华为OD机试 -最小叶子节点(Java)

    题目描述 二叉树也可以用数组来存储 给定一个数组 树的根节点的值储存在下标1 对于储存在下标n的节点 他的左子节点和右子节点分别储存在下标2n和2n 1 并且我们用 1代表一个节点为空 给定一个数组存储的二叉树 试求从根节点到最小的叶子节点
  • protoc 同时编译多个.protoc文件

    官方的示例 只是编译一个文件的命令行 protoc proto path IMPORT PATH cpp out DST DIR java out DST DIR python out DST DIR go out DST DIR ruby
  • Navicat16连接Oracle报错:Oracle library is not loaded

    1 有时候我们在用navicat的时候连接oracle的时候 它会提示我们Oracle library is not loaded 这时候我们要首先验证本机上是否已安装oracle的客户端 如果已安装客户段 navicat中的oci dll
  • 什么是MMU,MMU的作用

    I 什么是MMU MMU的作用 MMU是Memory Management Unit的缩写 针对各种CPU MMU是个可选的配件 MMU负责的是虚拟地址与物理地址的转换 提供硬件机制的内存访问授权 现在的多用户多进程操作系统 需要MMU 才
  • element ui菜单导航栏的动态创建

  • mysql的dba是什么意思_【数据库】mysql dba是什么意思?

    MySQL DBA意思是MySQL数据库管理员 DBA就是数据库管理员的意思 要成为MySQL DBA 不是会哪些东西的问题 而是一定要对MySQL数据库方方面面都得非常精通才行 DBA的职责是 安装和升级数据库服务器 以及应用程序工具 数
  • 前端关于单点登录SSO的知识

    转自前端关于单点登录的知识 什么是单点登录 单点登录 Single Sign On 简称为 SSO 是目前比较流行的企业业务整合的解决方案之一 SSO的定义是在多个应用系统中 用户只需要登录一次就可以访问所有相互信任的应用系统 SSO一般都
  • 前端 HTML空格的六种方式

    HTML提供了5种空格实体 space entity 它们拥有不同的宽度 非断行空格 是常规空格的宽度 可运行于所有主流浏览器 其他几种空格 在不同浏览器中宽度各异 它叫不换行空格 全称No Break Space 它是最常见和我们使用最多
  • Android项目混淆ProGuard详解

    关于混淆 可以借助工具proguardgui bat来了解或者写混淆文件 proguardgui bat是谷歌提供的可视化混淆文件编写工具 proguardgui bat位于android sdk 的tools proguard bin目录
  • python使用opencv对图像添加噪声(高斯/椒盐/泊松/斑点)

    导读 这篇文章主要介绍如何利用opencv来对图像添加各类噪声 原图 1 高斯噪声 高斯噪声就是给图片添加一个服从高斯分布的噪声 可以通过调节高斯分布标准差 sigma 的大小来控制添加噪声程度 sigma越大添加的噪声越多图片损坏的越厉害
  • 新华三数字化转型与实践 附下载地址

    随着数字技术 智能技术的持续发展 市场环境的不断变化 百行百业相继进入了数字化转型的深水区 这是时代发展的必然 更是建设繁荣数字经济的基础 因此 如何进行数字化转型便成为百行百业需要共同面对的问题 作为数字化解决方案领导者 新华三自身的数字
  • 【高频java面试题】JVM的底层结构

    1 问 说说JVM的底层结构 从左图可知 JVM主要包括四个部分 1 类加载器 ClassLoader 在JVM启动时或者在类运行时将需要的class加载到JVM中 右图表示了从java源文件到JVM的整个过程 可配合理解 关于类的加载机制
  • Python基础语法【5】—— 结构数据类型之元组

    文章目录 一 创建元组 1 使用 直接创建元组 2 使用tuple 函数创建元组 二 访问元组元素 1 使用索引方式访问 2 使用切片方式访问 三 修改元组元素 1 对元组重新进行赋值 2 使用 拼接元组 元组概念 元组和列表类似 也是由一
  • 历年计算机科学领域中各大顶会的获奖文章 ICCV、AAAI、CVPR...

    Original address https jeffhuang com best paper awards html By Conference AAAI ACL CHI CIKM CVPR FOCS FSE ICCV ICML ICSE
  • git submodule的使用

    转自 http webfrogs me 2013 03 20 git submodule 开发过程中 经常会有一些通用的部分希望抽取出来做成一个公共库来提供给别的工程来使用 而公共代码库的版本管理是个麻烦的事情 今天无意中发现了git的gi
  • 【sql基础】条件查询

    写在前面 作者简介 鲸海鹿林 博客主页 鲸海鹿林的主页 名言警句 keep calm and carry on SQL6 查找条件 是 例如 查找学生表中来自北京 city 的学生id和name select id name from st
  • Go + Redis 实现分布式锁

    文章目录 一 前言 1 1 需要对交易订单加锁原因 1 2 加锁方案 二 Go Redis 实现分布式锁 2 1 为什么需要分布式锁 2 2 分布式锁需要具备特性 2 3 实现 Redis 锁应先掌握哪些知识点 2 4 golang 连接r
  • Linux安装MySQL(超详细,附图安装)

    一 安装MySQL服务 1 查看是否已经安装了MySQL rpm qa grep mysql 如果什么都没有 就是还没有装过MySQL 2 下载MySQL安装包 wget i c http dev mysql com get mysql57
  • 项目实战(一)HTML5+CSS3+JS完成前端网站的制作

    css样式 padding 0 margin 0 box sizing border box html body font family segoe UI Tahoma Geneva verdana sans serif line heig