是否有z-Index的替代品,可以有相同的效果

时间:2015-07-05 12:44:33

标签: css css3 web-site-project

我正在处理一个项目而z-index导致问题,因为在某些情况下href标签不起作用,它会导致严重的问题,我想问一下,是否有z-index的替代品可以有同样的效果吗?

1 个答案:

答案 0 :(得分:0)

使用z-index来href锚标记。然后它需要位置属性。

.anchor1 a{
    z-index:10;
    position: absolute;
    color:green;
    }

.anchor2 a{
    z-index:100;
    position: absolute;
    color:red;
    }
<span class="anchor1">
<a href ="pingme.html"/>Pingme</a>
</span>

<span class="anchor2">
<a href ="ping.html"/>Ping</a>
</span>