弹出内容有时出现在主要内容的后面 [英] Pop-up content sometimes appearing behind main content

查看:56
本文介绍了弹出内容有时出现在主要内容的后面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在WordPress网站上,我在屏幕的右上角设置了一个按钮(请求演示"),因此当单击时,会出现一个弹出窗口,其中包含一些文本和HubSpot表单.我的工作正常,但是出于某种原因,每十个页面中的一个就会重新加载HubSpot表单的内容,该内容不会出现在弹出窗口中,而是默认情况下出现在网页的主要内容后面,而无需单击按钮.

On a WordPress website I have a button set up on the top right of the screen ("Request a demo") so when clicked a popup appears with some text and a HubSpot form. I have it working fine but for whatever reason about one out of ten page reloads the content of the HubSpot form won't appear in the popup but appears behind the main content on the web page by default without the button being clicked.

这在Firefox上尤其糟糕,尽管它似乎大约有50%的时间会发生.我真的很努力寻找解决方案.

It's particularly bad on Firefox though where it seems to happen about 50% of the time. I'm really struggling to find a solution to this.

网站URL: http://crowdsight.co/

推荐答案

前几天,我也遇到了同样的问题.在样式设置按钮的CSS工作表中,添加以下行:

I had the same problem with mine the other day. In the CSS sheet where you style the button add the following line:

zindex: 1;

在上下文中,它看起来像这样:

In context it would look something like this:

.button {
   margin: 2px;
   border: 1px solid red;
   zindex: 1;
}

这篇关于弹出内容有时出现在主要内容的后面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆