HTML+CSS美⾷静态⽹页设计爱尚美⾷⽹页
⽤Adobe Dreamweaver CS6 制作
代码如下:
HTML代码:
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8" />
<title>爱尚美⾷</title>
<!--链接图⽚及css -->
<link rel="shortcut icon" type="images/x-icon" href="images/xlogo.png"/>
<!--引⼊样式 -->
<link rel="stylesheet" type="text/css" href="css/index.css"/>
</head>
<body>
<!--头部开始 -->
<header>
<div class="language_change">
<select name="language">
<option>简体中⽂</option>
<option>English</option>
</select >
<select name="currency">
<option>⼈民币</option>
<option>Dollor</option>
</select>
</div>
<div class="title"><p>爱尚美⾷</p></div>
<div class="logo"></div>
<div class="login_resister"><a href="#">登录</a>|<a href="#">注册</a></div>
<div class="shop_cart"><a href="#">购物车</a></div>
</header>
<menu>
<ul>
<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>
<li><a href="#">⼩吃</a></li>
</ul>
</menu>
<article>
<div class="topic1">
<p></p>
<h1>每⽇推荐</h1>
<div class="search">
<input type="text"/>
<input type="text"/>
<input type="button" value="站内搜索"/>
</div>
<ul>
<li>
<a href="#"><img src="images/可乐鸡翅.jpg"/></a>
<span>28yaun</span>
<h5>可乐鸡翅</h5>
</li>
<li>
<a href="#"><img src="images/蛋糕.jpg"/></a>
<span>15yaun</span>
<h5>提拉⽶苏</h5>
</li>
<li>
<a href="#"><img src="images/糖醋排⾻.jpg"/></a>
<span>28yaun</span>
<h5>糖醋排⾻</li>
<li>
for循环三个为空表示什么<a href="#"><img src="images/龙虾.jpg"/></a>
<span>75yaun</span>
<h5>深海龙虾</h5></li>
</ul>
</div>
<div class="topic2">
<p></p>
<h1>优惠菜品</h1>
<div class="shaoma">
<h2><h2>
<hr></hr>
<img src="images/m.png"/>
</div>
<ul>
<li>
学java的就业方向<a href="#"><img src="images/⽣蚝.jpg"/></a>
<span>49yaun</span>
<h5>蒜蓉⽣蚝</h5>
</li>
<li>
<a href="#"><img src="images/东坡⾁.jpg"/></a>
<span>49yaun</span>
<h5>东坡⾁</h5>
</li>
<li>哈夫曼树ht存储结构的初态和终态
<a href="#"><img src="images/蛋糕1.jpg"/></a>
<span>15yaun</span>
<h5>丝袜蛋糕</h5></li>
<li>
<a href="#"><img src="images/披萨.jpg"/></a>
<span>50yaun</span>
<h5>芝⼠披萨</h5></li>
</ul>
</div>
<div class="topic3">
<p></p>
<h1>今⽇套餐</h1>
<div class="tishi">
<h2>特别提⽰<h2>
<hr></hr>
<h4><br>请客⼈保管好⾃⼰的财产安全和帐户密码。</h4> </div>
<ul>
<ul>
<li>
<a href="#"><img src="images/咖喱饭.jpg"/></a> <span>39yaun</span>
<h5>咖喱鸡饭</h5>
</li>
<li>
<a href="#"><img src="images/套餐.jpg"/></a> <span>28yaun</span>
<h5>排⾻饭</h5>
</li>
<li>
<a href="#"><img src="images/蛋糕2.jpg"/></a> <span>20yaun</span>
<h5>千层蛋糕</h5></li>
<li>
<a href="#"><img src="images/蛋糕3.jpg"/></a> <span>25yaun n </span>
<h5>⽔果蛋糕</h5></li>
</ul>
</div>
</article>
<footer>
<p>
<a href="#">关于我们</a>|
<a href="#"></a>|
<a href="#">加⼊收藏</a>|
<a href="#">留⾔板</a>
</p>
</footer>
</body>
</html>
CSS代码:
@charset "utf-8"; /* CSS Document */
*{
margin:0 auto;
padding:0px;
}
body{
height:100%;
width:100%;
font-size:14px;
font-family:"微软雅⿊"; /*定义⽂字⼤⼩及字号*/ }
header{
background:#F6F6F6;
width:1200px;
height:80px;
margin:0 auto;
position:relative;
}
header div{
float:left;}
.title{
font-family:"华⽂⾏楷";
font-weight:bold;
font-size:68px;
text-align:center;
letter-spacing:10px;
line-height:80px;
margin-top:5px;
margin-left:27%;
color:#333;
}
.language_change select{
margin-left:10px;
height:24px;
}
.logo{
height:60px;
width:60px;
margin-top:10px;
background:url(../images/logo.jpg) no-repeat center center; background-size:100% 100%;
position:absolute;
margin-left:36%;}
a{
text-decoration:none;/*⽆⽂本装饰效果*/
color:#06F;}/*可⽤取⾊⼯具取⾊*/
a:hover{
color:#F00;}
.login_resister{
float:right;
margin-right:10px;
}/*登录注册框架位置*/
.shop_cart{
float:right;/*浮动在右边*/
margin-right:40px;;/*购物车框架位置*/}
.shop_cart a{
padding-left:22px;
background:url(../images/cart.PNG) no-repeat left center; }
/*列表样式*/
li{
list-style:none;
}
menu{
background:#F6F6F6;
height:70px;
width:1200px;
}
menu>ul{
/*height:70px;*/
float:left;
margin-left:12%;
}
menu>ul>li{
height:35px;
width:150px;
margin-top:30px;
background:#FDEA66;
float:left;
margin-left:2px;
text-align:center;/*⽂本居中*/
line-height:34px;
}
menu>ul>li>a{
display:inline-blockl;/*设置或检索对象是否及如何显⽰,内联块元素*/ height:40px;
width:90px;
font-weight:bold;
font-size:20px;
letter-spacing:1em;/*字间距*/
color:#333;
}
menu>ul>li>a:hover{
color:#F0C;}
article{
width:100%;}
.topic1{
html+css美食静态网页设计height:300px;
width:1200px;
background:#F6F6f6;}
.search{
iview callback 继续往下走float:right;
margin-right:30px;
margin-top:30px;
width:230px;
height:180px;
background:#FDEA66;
text-align:center;
}
.search>input{
margin-top:60px;
margin-left:35px;
height:30px;
width:160px;
border:3px solid #06F; /*输⼊与搜索边框颜⾊*/
float:left;推动高质量发展
background:#fee;
}
.search>input:last-child{
margin-top:10px;
margin-left:65px;
height:30px;
width:110px;
border:3px solid #06F; /*输⼊与搜索边框颜⾊*/
background:#fee; /*字体背景颜⾊*/
float:left;
color:#06F; /*字体颜⾊*/
letter-spacing:0.2em;
font:bold 22px/24px "华⽂⾏楷";}
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论