如何使用div+css实现网站首页

发布时间:2021-10-19 14:45:10 作者:小新
来源:亿速云 阅读:112

这篇文章主要介绍如何使用div+css实现网站首页,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>叮咚网首页</title>
<!--
<link href="叮咚网首页.css" rel="stylesheet" type="text/css"/>
-->
<style type="text/css">
.main{
width:100%;
height:2010px;
border:1px solid #000;
text-decoration: none;
}
.top{
width:100%;
height:52px;
border:1px solid #000;
}
.downMenu{
width:100%;
height:30px;
font:normal normal 20px "宋体";
color:#fff;
background-color: #000000;  
}
#search{
margin-left:520px;
}
a{
text-decoration: none;
}
#img1{
margin-left:330px;
}
#logo{
font:normal normal 20px "宋体";
padding-bottom: 5px;
}
#d{
padding-bottom:30px;
margin-left:290px;
}
a:link{
font-size: 20px;
color:aquamarine;
}
a:visited{
color:darkgray;
}
a:hover{
color:#FFFFFF;
}
a:active{
color:cadetblue;
}
.c{
margin-left:10px;
}
#img7{
width: 100%;
}
.commodity{
font:normal bold 40px "新宋体";
}
.bottom{
text-align: center;
}
#img5{
width:100%;
height:80px;  
}
.img2{
float:left;
}
.img3{
float:left;
margin-left:40px;
padding-right: 30px;
}
.hi1{
float:left;
margin-left:50px;
padding-top:60px;
text-align:center;
}
.hi2{
float:left;
margin-left:50px;
padding-top:20px;
text-align:center;
}
</style>

</head>
<body>
    <div class="main">
        <div class="top">
            <div id="logo">
                <img src="img/logo.gif" title="叮咚网logo" alt="logo"></img>    
                <img src="img/header.png" title="img1"   alt="img1" id="img1"></img>    
                <a href="登录.html" target="_blank" id="d"><font color="darkcyan">登录</font></a>&nbsp;&nbsp;
                <a href="注册.html" target="_blank"><font color="darkcyan">注册</font></a>&nbsp;&nbsp;
                <a href="购物车.html" target="_blank"><font color="darkcyan">购物车</font></a>
            </div>
        </div>
        <div class="downMenu">
                <a href="#" target="_blank">首页</a>&nbsp;&nbsp;
                <a href="#" target="_blank">手机数码</a>&nbsp;&nbsp;
                <a href="#" target="_blank">电脑办公</a>&nbsp;&nbsp;
                <a href="#" target="_blank">学习用品</a>&nbsp;&nbsp;
                <a href="#" target="_blank">家具电器</a>
                <input  id="search" type="text" name="search" value="search">
                <input type="submit" name="submit" value="submit">
        </div>
        <div class="slideshow">
            <img src="img/1.jpg" width="1333px" height="600px">
        </div>
        <div class="commodity">
            热门商品<img src="img/title2.jpg" class="c">
        </div>
        <div class="hotImg">
                <img src="img/big01.jpg" class="img2">
                <img src="img/middle01.jpg" class="img3">
                        <div class="hi1">
                            <img src="img/small08.jpg"><br />
                            <font face="黑体" color="#000000" size="3px" align="center">电饭煲</font><br />
                            <font face="黑体" color="red" size="3px" align="center">¥299.00</font>
                        </div>
                        <div class="hi1">
                            <img src="img/small05.jpg"><br />
                            <font face="黑体" color="#000000" size="3px" align="center">饮水机</font><br />
                            <font face="黑体" color="red" size="3px" align="center">¥439.00</font>
                        </div>
                        <div class="hi1">
                            <img src="img/small04.jpg"><br />
                            <font face="黑体" color="#000000" size="3px" align="center">烤箱</font><br />
                            <font face="黑体" color="red" size="3px" align="center">¥389.00</font>
                        </div>
                        <div class="hi2">
                            <img src="img/small08.jpg"><br />
                            <font face="黑体" color="#000000" size="3px" align="center">电饭煲</font><br />
                            <font face="黑体" color="red" size="3px" align="center">¥299.00</font>
                        </div>
                        <div class="hi2">
                            <img src="img/small05.jpg"><br />
                            <font face="黑体" color="#000000" size="3px" align="center">饮水机</font><br />
                            <font face="黑体" color="red" size="3px" align="center">¥439.00</font>
                        </div>

                        <div class="hi2">
                            <img src="img/small04.jpg"><br />
                            <font face="黑体" color="#000000" size="3px" align="center">烤箱</font><br />
                            <font face="黑体" color="red" size="3px" align="center">¥389.00</font>
                        </div>
                        <div class="hi2">
                            <img src="img/small08.jpg"><br />
                            <font face="黑体" color="#000000" size="3px" align="center">电饭煲</font><br />
                            <font face="黑体" color="red" size="3px" align="center">¥299.00</font>
                        </div>
                        <div class="hi2">
                            <img src="img/small05.jpg"><br />
                            <font face="黑体" color="#000000" size="3px" align="center">饮水机</font><br />
                            <font face="黑体" color="red" size="3px" align="center">¥439.00</font>
                        </div>
                        <div class="hi2">
                            <img src="img/small04.jpg"><br />
                            <font face="黑体" color="#000000" size="3px" align="center">烤箱</font><br />
                            <font face="黑体" color="red" size="3px" align="center">¥389.00</font>
                        </div>
               <img src="img/ad.jpg" id="img7"/>
        </div>
        <div class="commodity">
            最新商品<img src="img/title2.jpg" class="c">            
        </div>
        <div class="newImg">
                <img src="img/big01.jpg" class="img2">
                <img src="img/middle01.jpg" class="img3">
                        <div class="hi1">
                            <img src="img/small08.jpg"><br />
                            <font face="黑体" color="#000000" size="3px" align="center">电饭煲</font><br />
                            <font face="黑体" color="red" size="3px" align="center">¥299.00</font>
                        </div>
                        <div class="hi1">
                            <img src="img/small05.jpg"><br />
                            <font face="黑体" color="#000000" size="3px" align="center">饮水机</font><br />
                            <font face="黑体" color="red" size="3px" align="center">¥439.00</font>
                        </div>
                        <div class="hi1">
                            <img src="img/small04.jpg"><br />
                            <font face="黑体" color="#000000" size="3px" align="center">烤箱</font><br />
                            <font face="黑体" color="red" size="3px" align="center">¥389.00</font>
                        </div>
                        <div class="hi2">
                            <img src="img/small08.jpg"><br />
                            <font face="黑体" color="#000000" size="3px" align="center">电饭煲</font><br />
                            <font face="黑体" color="red" size="3px" align="center">¥299.00</font>
                        </div>
                        <div class="hi2">
                            <img src="img/small05.jpg"><br />
                            <font face="黑体" color="#000000" size="3px" align="center">饮水机</font><br />
                            <font face="黑体" color="red" size="3px" align="center">¥439.00</font>
                        </div>

                        <div class="hi2">
                            <img src="img/small04.jpg"><br />
                            <font face="黑体" color="#000000" size="3px" align="center">烤箱</font><br />
                            <font face="黑体" color="red" size="3px" align="center">¥389.00</font>
                        </div>
                        <div class="hi2">
                            <img src="img/small08.jpg"><br />
                            <font face="黑体" color="#000000" size="3px" align="center">电饭煲</font><br />
                            <font face="黑体" color="red" size="3px" align="center">¥299.00</font>
                        </div>
                        <div class="hi2">
                            <img src="img/small05.jpg"><br />
                            <font face="黑体" color="#000000" size="3px" align="center">饮水机</font><br />
                            <font face="黑体" color="red" size="3px" align="center">¥439.00</font>
                        </div>
                        <div class="hi2">
                            <img src="img/small04.jpg"><br />
                            <font face="黑体" color="#000000" size="3px" align="center">烤箱</font><br />
                            <font face="黑体" color="red" size="3px" align="center">¥389.00</font>
                        </div>
        </div>
        <div class="img5">
            <img src="img/footer.jpg" id="img5">
        </div>
        <div class="bottom">
            <a href="#" target="_blank"><font color="dodgerblue" size="3px"> 关于我们</font></a>&nbsp;&nbsp;&nbsp;
            <a href="#" target="_blank"><font color="dodgerblue" size="3px">联系我们</font></a>&nbsp;&nbsp;&nbsp;
            <a href="#" target="_blank"><font color="dodgerblue" size="3px">招贤纳士</font></a>&nbsp;&nbsp;&nbsp;
            <a href="#" target="_blank"><font color="dodgerblue" size="3px">法律声明</font></a>&nbsp;&nbsp;&nbsp;
            <a href="#" target="_blank"><font color="dodgerblue" size="3px">友情链接</font></a>&nbsp;&nbsp;&nbsp;
            <a href="#" target="_blank"><font color="dodgerblue" size="3px">支付方式</font></a>&nbsp;&nbsp;&nbsp;
            <a href="#" target="_blank"><font color="dodgerblue" size="3px">配送方式</font></a>&nbsp;&nbsp;&nbsp;
            <a href="#" target="_blank"><font color="dodgerblue" size="3px">服务声明</font></a>&nbsp;&nbsp;&nbsp;
            <a href="#" target="_blank"><font color="dodgerblue" size="3px">广告声明</font></a>

        </div>
        <div class="bottom">
            <font size="2px">Copyright&copy;2015-2016西部开源&nbsp;版权所有</font>
        </div>
    </div>
</body>

</html>

以上是“如何使用div+css实现网站首页”这篇文章的所有内容,感谢各位的阅读!希望分享的内容对大家有帮助,更多相关知识,欢迎关注亿速云行业资讯频道!

推荐阅读:
  1. 网站购物车界面(div+css实现)
  2. 网站登录界面(div+css实现)

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

div css

上一篇:CSS3中内容溢出的示例分析

下一篇:css有几种样式

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》