您的位置:首页 > Web前端 > CSS

html 页面样式-- div span 排版

2008-02-29 16:54 471 查看
由于div默认是block 块 会换行
span默认是inline 内联 同一行


<html>


<head>


</head>


<body>




<div align=left style="display:inline;border:1px solid green;width:20px;">11</div>


<div align=center style="display:inline;border:1px solid green;width:800px;">22</div>


<div align=right style="display:inline;border:1px solid green;width:150px;">33</div>


<hr />




<span align=left style="display:block;border:1px solid green;width:20px;">11</span>


<span align=center style="display:block;border:1px solid green;width:800px;">22</span>


<span align=right style="display:block;border:1px solid green;width:150px;">33</span>


</body>


</html>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: