• Welcome to the world's largest Chinese hacker forum

    Welcome to the world's largest Chinese hacker forum, our forum registration is open! You can now register for technical communication with us, this is a free and open to the world of the BBS, we founded the purpose for the study of network security, please don't release business of black/grey, or on the BBS posts, to seek help hacker if violations, we will permanently frozen your IP and account, thank you for your cooperation. Hacker attack and defense cracking or network Security

    business please click here: Creation Security  From CNHACKTEAM

VUE-016-CSS控件div级别显示为顶级 CSS级别样式控件示例


Recommended Posts

在博客中添加QQ、微信好友二维码和微信官方账号推广二维码后,浏览我的博文,发现博文中有插入代码时,代码层会屏蔽好友二维码和微信官方账号二维码的信息。因此,需要通过修改css来控制div的显示级别,以更好地显示好友和推广二维码信息。遮挡如下图所示:

zlvys5euuhj3292.png

通过设置css等标签的样式(z-index ),可以控制标签的分层显示。Z-index是垂直于计算机屏幕的分层控件。当z-index的值较大时,相应的层越靠近计算机前的用户观察者,它就越靠近层次中的顶层。

这里好友和微信官方账号的二维码信息要一直显示在页面顶部(最靠近用户观察者),所以在对应的层级样式中,将z-index设置为一个比较大的值,比如999,如下图所示:

5yqrkoifb1g3293.png

保存后再次刷新页面,可以看到我的博文页面二维码信息显示正确。如下图所示:

ofcczln3ddh3294.png

后记:

Z-index控制标签的显示级别,所以也可以用它来动态改变z-index的值,实现标签的动态显示控制。

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now