首页 > Web开发 > 详细

CSS老师授课3-float

时间:2016-05-22 21:36:07      阅读:286      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!