目录
一、前言
宝马汽车网页实例,带背景音乐。应用html+css,代码、页面布局简单明了,适用于初学者或简单的网页制作,供大家参考。本网页支持如Dreamweaver、HBuilder、Text 、Vscode 等任意html编辑软件进行编辑修改;支持包括IE、Firefox、Chrome、Safari主流浏览器浏览。
二、网页文件
三、网页效果
以下为网页正文(节选示例):
四、代码展示
1.HTML
代码如下(节选示例):
<html>
<head>
<title>宝马</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="css/style.css" rel="stylesheet" type="text/css" media="all" />
</head>
<body>
<embed src="music/bmw.mp3" loop="true" width="0" height="0"></embed>
<div class="wrap">
<div class="header">
<div class="logo">
<h1><a href="index.html"><img src="images/logo.png" alt=""></a></h1>
</div>
<div class="clear"></div>
<div class="h_main">
<ul class="nav">
<li><a href="index.html" target="_blank">首页</a></li>
<li><a href="html/jianjie.html" target="_blank">公司简介</a></li>
<li><a href="html/lishi.html" target="_blank">品牌历史</a></li>
<li><a href="html/hanyi.html" target="_blank">车标含义</a></li>
<li><a href="html/dashi.html" target="_blank">大事年表</a></li>
<li><a href="html/zhanshi.html" target="_blank">宝马展示</a></li>
</ul>
<div class="search">
<form>
<input type="text" value="">
<input type="submit" value="">
</form>
</div>
<div class="clear"></div>
</div>
</div>
<div class="container"> <a href="#"><img src="images/1.jpg" width="1024" height="500"/></a> </div>
<div class="clear"></div>
<div class="main">
<div class="bm_title"><a href="#.html">公司简介</a></div>
<div class="bm_des">
<p>宝马汽车为德系三大豪华品牌之一,宝马的车系有1、2、3、4、5、6、7、i、X、Z等几个系列,还有在各系基础上进行改进的M系(宝马官方的高性能改装部门)。</p>
<p>宝马公司创建于1916年,总部设在德国慕尼黑。</p>
<p>BMW的蓝白标志象征着蓝天,白云和旋转的螺旋桨。80年来,宝马汽车由最初的一家飞机引擎生产厂发展成为以高级轿车为主导,并生产享誉全球的飞机引擎、越野车和摩托车的企业集团,名列世界汽车公司前列。宝马也被译为“巴依尔”。</p>
<p>宝马的车系有1、2、3、4、5、6、7、8(停产)、i、M、X、Z 几个系列。其中,1系是小型汽车,2系是小型轿跑,3系是中型汽车,4系是中型轿跑(含敞篷),5系是中大型汽车,6系是中大型轿跑(含敞篷),7系是豪华D级车,i系是宝马未量产的概念车系列,M是宝马的高性能与跑车版本,X系是宝马特定的SUV(运动型多功能汽车)车系,Z系是宝马的入门级跑车。最新又出了4系,量产版的宝马4系基本就是由4系Coupe概念车转化而来,接替原3系Coupe。</p>
<p></p>
</div>
<div class="bm_title"><a href="#.html">宝马展示</a></div>
<div class="clear"></div>
<div class="bm_list">
<ul>
<li> <a href="#.html"><img src="images/pic1.jpg" width="230"></a> </li>
<li> <a href="#.html"><img src="images/pic2.jpg" width="230"></a> </li>
<li> <a href="#.html"><img src="images/pic3.jpg" width="230"></a> </li>
<li> <a href="#.html"><img src="images/pic4.jpg" width="230"></a> </li>
</ul>
<div class="clear"></div>
</div>
</div>
<div class="footer">
<p class="w3-link">Copyright © 德国宝马</p>
<div class="clear"></div>
</div>
</div>
</body>
</html>
......
2.CSS
代码如下(节选示例):
* {
margin: 0;
padding: 0;
font-family: Microsoft YaHei;
}
.clear {
clear: both;
}
.fl {
float: left;
}
.fr {
float: right;
}
img {
border: none;
}
a {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
li {
list-style-type: none;
}
.ofh {
overflow: hidden;
}
.center {}
.em {
text-indent: 2em;
}
nav.vertical ul li {
display: block;
}
/* vertical menu */
nav.horizontal ul li {
display: inline-block;
}
/* horizontal menu */
img {
max-width: 100%;
}
/*end reset*/
body {
background: #000;
}
.wrap {
width: 1024px;
height: auto;
padding: 10px;
margin: auto;
background: #555;
}
.header {}
.logo {
float: left;
}
.h_main {
width: 1024px;
background: #333;
}
.nav {
width: 72%;
float: left;
}
.nav li.active h3 span {
color: #F51055;
}
.nav li {
border-right: 1px solid rgba(32, 32, 32, 1);
width: 14.333%;
display: inline-block;
margin-right: -4px;
}
.nav li:last-child {
margin-right: 0;
}
.nav li a {
line-height: 2.2em;
display: block;
color: #b4b4b4;
font-size: 1.2em;
padding: 8px;
text-align: center;
letter-spacing: 0px;
font-family: 'Anaheim', sans-serif;
}
.nav li a:hover {
color: #9C9C9C;
}
/*search*/
.search {
width: 20%;
float: right;
margin: 10px;
background: #C9C9C9;
border-radius: 5px;
}
.search input[type="text"] {
font-size: 13px;
padding: 6px 10px;
border: none;
outline: none;
color: #555555;
background: none;
width: 76.333%;
}
.search input[type="submit"] {
background: url('../images/search.png') no-repeat 4px 4px;
padding: 2px 10px;
width: 16px;
border: none;
cursor: pointer;
}
/*--Slider--*/
.container {
width: 1024px;
margin: auto;
height: 500px;
}
.container2 {
width: 1024px;
margin: auto;
height: 300px;
}
/*main*/
.main {}
.bm_title {
width: 1024px;
height: 30px;
background: #999;
font-size: 16px;
color: #eee;
line-height: 30px;
margin: 5px auto;
}
.bm_des {
width: 1004px;
padding: 10px;
height: auto;
margin: auto;
font-size: 14px;
color: #ddd;
}
.bm_des p {
text-indent: 2em;
font-size: 14px;
color: #ddd;
}
.bm_title a {
font-size: 16px;
color: #eee;
line-height: 30px;
padding-left: 10px;
}
.bm_list {
width: 1024px;
height: auto;
margin: auto;
}
.bm_list li {
width: 230px;
height: 160px;
float: left;
margin: 12px;
}
.bm_list li img {
width: 230px;
height: 160px;
}
.footer {
width: 1024px;
border-top: 2px solid #999;
height: auto;
margin: 10px auto;
text-align: center;
font-size: 14px;
line-height: 36px;
color: #fff;
}
......
五、更多推荐
您的支持是我创作的动力!关注作者,点赞收藏博文,获取更多源码,3Q!
Web前端网页制作、网页完整代码、期末大作业模板案例等技术内容,有兴趣的联系我交流学习!
更多优质博客文章、网页模板点击以下链接查阅:仙女网页设计-CSDN博客。