Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/38.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/google-chrome/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 在Opera和Chrome中悬停时出现Z索引错误_Css_Google Chrome_Z Index_Opera_Opera Blink - Fatal编程技术网

Css 在Opera和Chrome中悬停时出现Z索引错误

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:

上面是我的CSS代码。当我把鼠标悬停在一个盒子上时,它应该在其他盒子的上面。它在Mozilla中运行良好,但在Chrome和Opera中不起作用。使用
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;
}