Css 在Opera和Chrome中悬停时出现Z索引错误
上面是我的CSS代码。当我把鼠标悬停在一个盒子上时,它应该在其他盒子的上面。它在Mozilla中运行良好,但在Chrome和Opera中不起作用。使用Css 在Opera和Chrome中悬停时出现Z索引错误,css,google-chrome,z-index,opera,opera-blink,Css,Google Chrome,Z Index,Opera,Opera Blink,上面是我的CSS代码。当我把鼠标悬停在一个盒子上时,它应该在其他盒子的上面。它在Mozilla中运行良好,但在Chrome和Opera中不起作用。使用z-index时似乎存在错误 这里有一个链接:对于position:static项,z索引将无法正常工作,元素索引将简单地遵循HTML的流程 将position:relative添加到您的。博客框:hover类 .blog-box { background-color: #fff; width: 300px; height:
z-index
时似乎存在错误
这里有一个链接:对于
position:static
项,z索引将无法正常工作,元素索引将简单地遵循HTML的流程
将position:relative
添加到您的。博客框:hover
类
.blog-box {
background-color: #fff;
width: 300px;
height:auto;
margin-bottom: 15px;
-webkit-transition: all .3s ease-in-out;
-moz-transition: all .3s ease-in-out;
-ms-transition: all .3s ease-in-out;
transition: all .3s ease-in-out;
}
.blog-box:hover {
box-shadow: 5px 5px 10px #000;
-webkit-transform: scale(1.1);
-moz-transform: scale(1.1);
-ms-transform: scale(1.1);
transform: scale(1.1);
z-index: 9999;
}
编辑:最好将其添加到您的.blog框中
.blog-box:hover{
box-shadow: 5px 5px 10px #000;
-webkit-transform: scale(1.1);
-moz-transform: scale(1.1);
-ms-transform: scale(1.1);
transform: scale(1.1);
z-index: 9999;
position: relative;
}