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>
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>
相关文章推荐
- HTML基础第一课(div,span标签,选择器,文本样式)
- 大学生简单网页div+css网页纯手写代码制作html静态页面切图排版
- 关于Asp.net2.0下Div+Css页面布局样式失效的解决方法
- <span> <div> 局部 keydown ,keyup事件。页面部分div $(document) 无效,可能焦点,添加焦点。
- div的dispaly:inline样式 和span的区别
- 关于将html页面转成jsp页面之后样式变化的问题
- HTML学习笔记(七)<div>与<span>
- html页面中打印样式
- Chrome查看html样式基本操作-div
- css笔记1: html页面的CSS、DIV命名规则
- HTML页面打印分页标签样式
- 真正让HTML标签、DIV、SPAN拥有onfocus和onblur,聚焦和失焦
- Study Html《如何让DIV固定在页面的某个位置而不随着滚动条随意滚动》
- IE6样式问题:html静态页正常在aspx页面中出现严重问题
- div 加载 html页面的方法
- HTML基础(2.a,p,h,span,div)
- (18)HTML标签详解之<div> <span>
- HTML页面打印分页标签样式
- HTML中div和span两个标签的区别
- html页面的CSS、DIV命名规则