码迷,mamicode.com
首页 > Web开发 > 详细

用css样式和div画出田字格

时间:2015-04-30 20:25:29      阅读:1184      评论:0      收藏:0      [点我收藏+]

标签:html


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">

<head>

<title></title>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />


</head>

<style>

.header{

width: 200px;

height: 200px;

background: blue;

float: left

}

.main{

width: 200px;

height: 200px;

background: red;

float: left

}

.footer{

width: 200px;

height: 200px;

clear: left;

float: left;

background: green

}

.bootom{

width: 200px;

height: 200px;

float: left;

background: black

}

</style>

    <body>

    <div class="header"></div>

    <div class="main"></div>

    <div class="footer"></div>

    <div class="bootom"></div>

    </body>

</html>


用css样式和div画出田字格

标签:html

原文地址:http://aabbc59.blog.51cto.com/3844828/1640900

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!