css设置z-index 失效的解决方法
css设置z-index 失效的解决方法
发布时间:2016-12-27 来源:查字典编辑
摘要: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>

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

推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
相关阅读
网友关注
最新 Div+Css教程学习
热门 Div+Css教程学习
网页设计子分类