使用HTML和css制作简单的公司介绍网页

  • Post author:
  • Post category:其他

使用HTML和css制作简单的公司介绍网页

创作不易,可否给作者点个赞再走

HTML部分:

/**
* author 阿木木
* date 09/23  14:32
* /
<html>
	<head>
		<title>网站首页</title>
		<link href="css/style.css" type="text/css" rel="stylesheet" />
	</head>
	<body>
		<div class="header">
			<div class="logo">
				<div class="logoleft fl">
					<a href=""><img src="img/logo.png"</a>
				</div>
				<div class="logoright fr">
					<a href=""><img src="img/header_text.png"</a>
				</div>
				<div class="clear"></div>
			</div>
			<div class="menu">
				<div class="menubtn fl">
					<a href="">全部课程</<a>
				</div>
				<ul class="fr">
					<li><a href="">首页</a></li>
					<li><a href="">粤嵌动态</a></li>
					<li><a href="">关于我们</a></li>
					<li><a href="">师资力量</a></li>
					<li><a href="">联系我们</a></li>
				</ul>
				<div class="clear"></div>
			</div>
		</div>
		<div class="main">
			<div class="banner">
				<div class="title">高端培训专家-粤嵌教育</div>
			</div>
			<div class="nav">
				<ul>
					<li><a href="">公司简介</a></li>
					<li><a href="">发展历程</a></li>
					<li><a href="">人才招聘</a></li>
					<li><a href="">联系我们</a> </li>
				</ul>
			</div>
			<div class="infobg">
				<div class="info">
					info
				</div>
			</div>
		</div>
		<div class="footer">
			footer
		</div>
	</body>
</html>

css部分:

/** 全局样式 **/
*{
	margin:0px;
	padding:0px;
}
body{
	font-size:14px;
}
li{
	list-style:none;
}
a{
	color:#000;
	text-decoration: none;
}
.fl{
	float:left;
}
.fr{
	float:right;
}
.clear{
	clear:both
}


/** index.html **/
.header{
	width:1200px;
	margin:0px auto;
}
.logo{
	width:100%;
	height:56px;
	margin:20px 0px;
}
.logoleft{
	width:238px;
	height:56px;
	
}
.logoright{
	width:259px;
	height:27px;
}
.menu{
	width:100%;
	height:50px;
}
.menubtn{
	width:242px;
	height:50px;
	/**background:url(../img/course_menu_bg.png) no-repeat;**/
	background-image: url(../img/course_menu_bg.png);
	background-repeat: no-repeat;
	padding-left: 100px;
}
.menubtn a{
	color: white;
	font-size: 18px;
	line-height: 50px;
}
.menu ul li{
	width:130px;
	height:50px;
	float:left;
	text-align: center;
	line-height:50px;
}
.menu ul li a{
	font-size: 16px;
}
.main{
	width:100%;
}
.banner{
	width:100%;
	height:400px;
	background:#000000 url("../img/banner.png") no-repeat center center;
}
.banner .title{
	text-align: center;
	color: white;
	font-size: 50px;
	padding-top: 155px;
}
.nav{
	width: 1200px;
	height: 80px;
	margin:0px auto;
}
.nav ul{
	padding: 20px 0px;
}
.nav ul li{
	width: 299px;
	height: 40px;
	float: left;
	text-align: center;
	line-height: 40px;
}
.nav ul li:nth-child(1),.nav ul li:nth-child(2),.nav ul li:nth-child(3)
{border-right: 1px #d9d9d9 solid;}
.nav ul li a{
	font-size: 18px;
}
.infobg{
	width: 100%;
	padding: 60px 0px;
	background-color:#f3f3f3;
}
.info{
	width: 1200px;
	height: 480px;
	background-color: #fff;
	margin: 0px auto;
	
}
.footer{
	width:100%;
	height:120px;
	background:#23282d
}

运行后效果图:
在这里插入图片描述
图片可自行更改。


版权声明:本文为qq_44364267原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。