静态博客网页(35%)

在上次网页代码的基础上新增加了一些功能:

#banner:一张头部图片

#left:中间的左边部分

#main:中间主要部分

#menu:导航菜单

#right:中间的右边部分

#footer:尾部的部分

#zuozhe:图片和文本

#huoli:标题、小图标、列表

#list:标题、列表 文章分类列表 最新文章列表

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>无标题文档</title>
<!--引入css文件用link标签-->
<link href="blog.css" type="text/css" rel="stylesheet" />
<!--<script type="text/javascript" src=""></script>-->

</head>

<body>
    <div id="box">
        <div id="banner">
            <img src="images/bg.jpg" alt="我的图片不见了" />
        </div>
        <div id="menu">
            我是菜单
        </div>
        <div id="main">
            <!--左边区域-->
               <div id="left">
                左边区域
            </div>
            <div id="right">
                右边区域
            </div>         
        </div>
        <div id="footer">
            footer
        </div>
    </div>
</body>
</html>

 

 
@charset "utf-8";
/* CSS Document */
#box{
    background-color:#F00;
    width:1024px;
    height:1300px;
    /*margin:0 auto;*/
    margin:0 auto 0 auto;/*上 右 下 左*/
}
/*放图片,设置高度和图片一样高*/
#banner{
    background-color:#66F;
    height:209px;
}
#menu{
    background-color:#C3F;
    height:50px;
}
#main{
    background-color:#6F0;
    height:1000px;
}
#left{
    background-color:#33C;
    height:1000px;
    width:250px;
    float:left;/*可以使div横向排排坐*/
}
#right{
    background-color:#F3F;
    height:1000px;
    width:774px;
    float:right;/*可以使div横向排排坐*/
}

#footer{
    background-color:#F63;
    height:80px;
}
 

知识点:

HTML中的标签:块标签div、图片<img>、行内标签<span>、h5标题、列表标签<ul>、<li>

CSS样式中的属性:

图片边框:border

高:height  

宽:width

内边距:pandding

外边距:margin

边框4个角设为圆角:border-radius

文本内容居中:text-align

字体:font-size、font-family、font-weight、color

垂直居中:line-height

取消项目符号:list-style

浮动:float

字体下划线:text-decoration

背景图片:backround

转载于:https://my.oschina.net/u/4091210/blog/3024167

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值