手机
当前位置:查字典教程网 >网页设计 > 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 失效的解决方法】相关文章:

li行间距大(IE中多了5个像素)的解决方法

div+css垂直居中的五种实现方法

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

ie6不兼容hover ie6 a hover属性失效解决办法

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

css中的框架模

页脚始终保持在页面底部的网页布局方法

CSS设计网页头部的写法

DIV下图片自适应解决方法

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

精品推荐
分类导航