首页 > 后端开发 > php教程 > 如何让一个DIV浮动在另一个DIV上面,DIV浮动DIV_PHP教程

如何让一个DIV浮动在另一个DIV上面,DIV浮动DIV_PHP教程

WBOY
发布: 2016-07-13 16:53:53
原创
1647 人浏览过

如何让一个DIV浮动在另一个DIV上面,DIV浮动DIV

 

直接上DEMO了

<span><!</span><span>DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"</span><span>></span>
<span><</span><span>meta </span><span>http-equiv</span><span>="Content-Type"</span><span> content</span><span>="text/html; charset=gb2312"</span> <span>/></span>
<span><</span><span>style </span><span>type</span><span>="text/css"</span><span>></span><span>
<!-- 
.d1 </span><span>{</span><span>
        position</span><span>:</span><span>absolute</span><span>;</span><span>
        top</span><span>:</span><span>20px</span><span>;</span><span>
        left</span><span>:</span><span>20px</span><span>;</span><span>
        width</span><span>:</span><span>200px</span><span>;</span><span>
        height</span><span>:</span><span>200px</span><span>;</span><span>
        background</span><span>:</span><span>red
        </span><span>}</span><span>
.d2 </span><span>{</span><span>
        width</span><span>:</span><span>500px</span><span>;</span><span>
        height</span><span>:</span><span>100px</span><span>;</span><span>
        background</span><span>:</span><span>blue</span><span>;</span>
        <span>}</span><span>

-->
</span><span></</span><span>style</span><span>></span>
<span><</span><span>div </span><span>class</span><span>="d1"</span><span>></</span><span>div</span><span>></span>
<span><</span><span>div </span><span>class</span><span>="d2"</span><span>></</span><span>div</span><span>></span>
登录后复制

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/1052442.htmlTechArticle如何让一个DIV浮动在另一个DIV上面,DIV浮动DIV 直接上DEMO了 ! DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.d...
相关标签:
来源:php.cn
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板