position

for example, position and float in css.

by muxiaobai

HTML

<div style="background: blue;left: 50px;position: fixed;">0</div>
<div >
</div>
<strong>strong</strong><em>em</em><span>span</span>
<div style="background: blue">A</div>
<div style="background: red; position: relative; top: 20px; left: 20px;">B</div>
<div style="background: green">C</div>
<div style="background: blue;">D</div>
<!--position默认static的情况下,left,right,top,botton 是无效的 -->
<div style="background: red; position: absolute; top: 800px; left: 20px;">E</div>
<div style="background: green">F</div>
<div style="background: green">F</div>

<em>|||||||||||我是最左边的元素</em><span>span1</span><em>em</em><span style="float:left;">span  float :left</span><strong>strong</strong>

CSS

div { width: 100px; height: 50px; line-height: 50px; text-align: center; color: #fff; }
  strong { background: #808080; }
  em { background: #ffd800; }
  span { background: #b6ff00; }