手机
当前位置:查字典教程网 >网页设计 > Div+Css教程 >css设置z-index 失效的解决方法
css设置z-index 失效的解决方法
摘要:UntitledPage#king_of_diamonds{position:relative;background-color:gray;...

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title>Untitled Page</title> <style type="text/css">#king_of_diamonds { position: relative; background-color:gray; width:30px; height:30px; left: 145px; top: 145px;}#ace_of_diamonds { position:relative; background-color:blue; width:300px; height:300px; left: 160px; top: 130px; z-index: 1;} </style></head><body> <form id="form1" runat="server"> <div id="king_of_diamonds"> a </div> <div id="ace_of_diamonds"> b </div> </form></body></html>

提示:您可以先修改部分代码再运行

【css设置z-index 失效的解决方法】相关文章:

常用的10种CSS BUG解决方法与技巧

ie placeholder属性的兼容性问题解决方法

IE.JS解决IE兼容性问题方法汇总

DIV下图片自适应解决方法

CSS让ul所有的li居中显示的方法

img标签下多余空白BUG解决方法

清除浮动的空DIV方法

span设CSS样式总是不起作用的解决方法

CSS设计网页头部的写法

IE6下图片下方有空间距的多种解决方法

精品推荐
分类导航