Javascript CSS浮动滚动顶部按钮不可在iframe顶部单击
我有固定位置的浮动按钮,但当按钮位置在iframe(discus或其他)上时,我无法单击我的按钮。在iframe上放置按钮时,如何使其可单击?我在按钮上设置了z-index 9999,在iframe上设置了z-index 1,但仍然无法正常工作Javascript CSS浮动滚动顶部按钮不可在iframe顶部单击,javascript,css,Javascript,Css,我有固定位置的浮动按钮,但当按钮位置在iframe(discus或其他)上时,我无法单击我的按钮。在iframe上放置按钮时,如何使其可单击?我在按钮上设置了z-index 9999,在iframe上设置了z-index 1,但仍然无法正常工作 | | | | | | | Very Tall Iframe | |------
| |
| |
| |
| Very Tall Iframe |
|------ |
|Button| |
|------ |
.CSS
它在我的浏览器中工作
.up{
z指数:9999;
显示:块;
位置:固定;
底部:70像素;
右:23px;
填充:0;
溢出:隐藏;
大纲:无;
边界:无;
边界半径:2px;
}
iframe{
宽度:1px!重要;
最小宽度:100%!重要;
边界:没有!重要;
溢出:隐藏!重要;
高度:1973px!重要;
z指数:1;
}
按钮
.up {
z-index: 9999;
display: block;
position: fixed;
bottom: 70px;
right: 23px;
padding: 0;
overflow: hidden;
outline: none;
border: none;
border-radius: 2px;
}
iframe {
width: 1px !important;
min-width: 100% !important;
border: none !important;
overflow: hidden !important;
height: 1973px !important;
z-index: 1;