css和html简单的页面效果

css和html简单的页面效果实例

页面制作第一步就是页面的布局,每个页面的布局有所不一,一个好的页面他的页面布局可以帮助阅览者迅速的找到自己所需要的内容页面,第二步就是颜色上的搭配,颜色搭配的好可以让阅览者赏心悦目,让阅览者看了还想看,下次还来游览你的页面,第三步就是内容的填充,内容丰富,对阅览者帮助甚大,可以提高页面的游览人数。
下面就是今天的做的一个简单的页面,希望对学前端的朋友门有所启发。

html代码如下:
<!DOCTYPE html>
<html>
    <head lang="en">
        <meta charset="UTF-8">
        <title>css与html简单页面效果实例</title>
        <link rel="stylesheet" type="text/css" href="css.css">
    </head>
<body>
    <div class="container">
        <div class="wrapper">
            <div class="heading">
                <div class="heading_nav">
                    <div class="heading_title">
                        淘一淘
                    </div>
                    <div class="heading_navbar">
                        <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="heading_img">
                        <img src="timg (1).jpg">
                    </div>
                    <div class="heading_soptlight">
                        <form>
                            <input type="text">
                        </form>
                    </div>
                </div>
            </div>
            <div class="body">
                <div class="body_title">
                    <h3>鞋类专卖区</h3>
                    <p>走过路过,千万别错过,过来瞧一瞧看一看咧,满500减50了诶</p>
                </div>
                <hr/>
                <hr/>
            </div>
        </div>
        <div class="footing">
            @版权专属淘一淘
        </div>
    </div>
</body>
</html>

css代码如下:

*{
    margin: 0px;
    padding:0px;
}
body{
    background-color: snow;
}
.wrapper{
    width: 80%;
    height: 1000px;
    background-color: antiquewhite;
    margin: 0px auto;
}
.heading{
    margin: 0px;
    width:100%;
    height: 120px;
    background-color: snow;
    margin: 0px auto;
}
.heading_title{
    float: left;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 30px;
    color: burlywood;
}
.heading_nav{
    padding-bottom: 30px;
    padding-top: 30px;
    width: 100%;
    height: 30px;
    position: relative;
}
ul{
    margin-left: 40px;
    float: left;
    list-style-type: none;
    padding-top: 6px;
    padding-bottom: 6px;
}
li{
    padding-left: 10px;
    display: inline;
}
a:link,a:visited{
    font-weight: bold;
    color: darkgray;
    text-align: center;
    padding: 6px;
    text-decoration: none;
}
a:hover,a:active{
    color:dimgray;
}
.heading_img img{
    border-radius: 30px;
    display: inline;
    width: 26px;
    height: 26px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, alph2);
    float: right;
}
.heading_soptlight form{
    float:right;
    width: 100px;
    height: 26px;
    position: relative;
    margin-right: 100px;
}
form input{
    height: 26px;
    border-radius: 30px;
}
.body{
    padding:30px;
    height: auto;;
    width: auto;
}
.body_title h3{
    font-size: 30px;
    font-family: Arial, Helvetica, sans-serif;
    color: #333333;
}
.body_title{
    margin-top: 20px;
    margin-bottom: 20px;
}
.footing{
    padding-top: 20px;
    text-align: center;
    font-size: 10px;
    color: darkgray;
}

以上就是小编今天编写的内容,希望对大家有帮助,同时,自己也会对前端的学习更加的努力,谢谢大家支持,我们下篇博客再见。

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值