前端学习之路——简单页面效果

html:

<!doctype html>
<html>

     <head>

         <meta charset="UTF-8">
         <title></title>
         <link href="简单页面效果实例.css" type="text/css" rel="stylesheet">
    </head>
    <body>

<!--head-->
    <div class="head">
        <div class="headtitle">
            <h2>Colorful Life</h2>
        </div>

        <div class="headlead">
            <ul>
                <li><a href="">Working</a></li>
                <li><a href="">Eating</a></li>
                <li><a href="">Playing</a></li>
                <li><a href="">Sleeping</a></li>
            </ul>
        </div>

        <div class="headimage">
            <img src="%E5%9C%86%E5%BD%A2%E5%9B%BE%E6%A1%88.jpg">
        </div>

        <div class="headform">
            <form>
                <input type="text">
            </form>
        </div>
    </div>

<!--body-->
    <div class="body">
        <div class="bdytitle">
            <h3>Enjoy everyday of us!!</h3>
            <p>let's study with us,improve with us,we need you!</p>

        </div>

        <div class="img1">
            <img src="flour.jpg">
            <p>Scene</p>
        </div>

        <div class="img1">
            <img src="%E5%A4%A9%E7%A9%BA%20(1).jpg">
            <p>Sky</p>
        </div>

        <div class="img1">
            <img src="sherlock.jpg">
            <p>Sherlock</p>
        </div>

        <div class="img1">
            <img src="%E5%A4%A9%E7%A9%BA%20(3).jpg">
            <p>Lake</p>
        </div>
    </div>

    <div class="foot">by Bianca</div>
    </body>
</html>

css:

.head{
    width:100%;
    height:100px;
    background-color:dodgerblue;
}

.headtitle{
    height:100px;
    width: 200px;
    float: left;
    padding-left: 10px;
}

.headlead{
    height:50px;
    width: 400px;
    float: left;
    margin-top: 25px;
}


li{
    padding:2px;
    display: inline;
}


a:link,a{
    color:snow;
    text-align:center;
    padding: 2px;
    text-decoration: none;
}

a:hover{
    color:black;
}

.headimage{
    float:right;
    margin-top:30px;
    margin-right: 5px;
}

.headimage img{
    height: 60px;
    width: 60px;
}

.headform form{
    float:right;
    height:26px;
    margin-right:50px;
}

form input{
    height:20px;
    background-color: cadetblue;
    width:100px;
    margin-top: 50px;
    border-radius: 30px;/*圆角弧*/
    float:right;
}
.body{
    background-color: cadetblue;
    width:100%;
    height:500px;
}
.bdytitle{
    color:snow;
    text-align: left;
}

.bodytitle h3{
    margin-left: 20px;
}
.bdytitle p{
    margin:20px;
}

.img1{
    border:2px solid lightgrey;
    float:left;
    text-align: center;
    margin:30px 34px;
}

.img1 img{
    margin:5px;
    width:250px;
    height:220px;
}

.img1 p{
    color:snow;
    font-size:20px;
}

.foot{
    text-align: center;
    background-color: lightgreen;
    height:50px;
    padding:20px;
    font-size: 30px;
    color:burlywood;
}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值