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

CSS老师授课3-float

时间:2016-05-22 21:39:05      阅读:201      评论:0      收藏:0      [点我收藏+]

标签:

 

 

 

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 2 <html xmlns="http://www.w3.org/1999/xhtml">
 3 <head>
 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 5 <title>无标题文档</title>
 6 <style type="text/css">
 7 *{
 8     margin:0px;
 9     padding:0px;}
10 .a
11 {
12     width:200px;
13     height:400px;
14     border:1px double red;}
15 </style>
16 </head>
17 
18 <body>
19 <div class="a" style="float:left;">1</div>
20 <div class="a" style="float:right;">2</div>
21 <div class="a" style="float:left;">3</div>
22 <div class="a" style="float:right;">4</div>
23 <div class="a" style="float:left;">5</div>
24 <div class="a" style="float:right;">6</div>
25 <div class="a" style="float:left;">7</div>
26 <div class="a" style="float:right;">8</div>
27 
28 </body>
29 </html>

 

无标题文档

1
2
3
4
5
6
7
8

CSS老师授课3-float

标签:

原文地址:http://www.cnblogs.com/tonyhere/p/5517697.html

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