My Documents · 2013/06/04 0

div 漂浮代码 - 京东浮动客服代码

<div style="position: fixed; bottom: 0px; color: #000000; top: 30%; left: 1.5%"> <div>
<map name="FPMapService">
<area target="_blank" href="http://chat.jd.com/index.action?shopId=35744" shape="rect" coords="3, 84, 109, 112">
<area target="_blank" href="http://chat.jd.com/index.action?shopId=35744" shape="rect" coords="4, 124, 108, 150">
<area target="_blank" href="http://chat.jd.com/index.action?shopId=35744" shape="rect" coords="3, 159, 108, 185">
<area target="_blank" href="http://nuoen.jd.com" shape="rect" coords="0, 248, 109, 298">
</map>
<img src="http://img10.360buyimg.com/imgzone/g12/M00/0B/0D/rBEQYVGlbgQIAAAAAADVHg0U_1cAACO4gGaegwAANU2896.jpg" class="" usemap="#FPMapService" alt="" border="0" height="299" width="110">
<p></p>
</div>
</div>

 

CSS position 属性:规定元素的定位类型。

描述
absolute 生成绝对定位的元素,相对于 static 定位以外的第一个父元素进行定位。元素的位置通过 "left", "top", "right" 以及 "bottom" 属性进行规定。
fixed 生成绝对定位的元素,相对于浏览器窗口进行定位。元素的位置通过 "left", "top", "right" 以及 "bottom" 属性进行规定。
relative 生成相对定位的元素,相对于其正常位置进行定位。因此,"left:20" 会向元素的 LEFT 位置添加 20 像素。
static 默认值。没有定位,元素出现在正常的流中(忽略 top, bottom, left, right 或者 z-index 声明)。
inherit 规定应该从父元素继承 position 属性的值。

相关文章