HTML-------footer始终在浮动在底部

html5很强大

/*

css样式表代码

*/

body {
    padding:0px;
    margin:0px;
}

header {

    height:50px;
    width:100%;
    background-color:blue;

}

main {
   
    width:100%;
    background-color:azure;

}

footer {
    
    height:50px;
    width:100%;
    background-color:red;

}

.content {
 
    width:800px;
    display:inline-block;
    margin:0px auto;
    background:#00ff90;
}

.left_chunk {
    width:300px;
    height:460px;
    display:inline-block;/*实现菜单基本都是用float属性来实现,float属性会造成高度塌陷,需要清除浮动等问题,使用inline-block实现就不需要在意这样的问题。*/
    float:left;
    background:#ffd800;
}

.right_chunk {
    width:500px;
    height:360px;
    display:inline-block;/*实现菜单基本都是用float属性来实现,float属性会造成高度塌陷,需要清除浮动等问题,使用inline-block实现就不需要在意这样的问题。*/
    float:right;
    background:#808080;
}
 

 

 

/*

html页面代码

*/

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<link href="StyleSheet.css" rel="stylesheet" />
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
</head>
<body>
    <form id="form1" runat="server">

        <header>
            我是header
        </header>
        <main>
 
            <div class="content">
                           我是content
                <div class="left_chunk">
                </div>

                <div class="right_chunk">
                </div>

           </div>
        </main>
        <footer>
            我是footer
        </footer>

    </form>
</body>

</html>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值