显示所有内容

时间:2017-11-27 22:00:45

标签: javascript html css user-interface

我正在努力在其他一切之上展示一个div。

我已经关注SO的其他帖子,说使用z-index和position:absolute。

以下是描述我的意思的截图。

enter image description here

以下是类的css属性:

@media only screen and (min-width: 600px) {
  .cd-single-point .cd-more-info {
    position: absolute;
    width: 200px;
    height: 240px;
    padding: 1em;
    overflow-y: visible;
    z-index: 10;
    line-height: 1.4;
    border-radius: 0.25em;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  }
}

如果有人能够帮助我,我真的很感激。

可在此处找到该链接https://what-is-wrong-with-this-css.herokuapp.com/

由于

2 个答案:

答案 0 :(得分:0)

您可以尝试增加z-index: 999;

答案 1 :(得分:0)

  1. 尝试将z-index增加到9999
  2. 尝试使用!重要(可能有一些东西覆盖它)
  3. 尝试减少重叠元素的z-index(再次尝试使用!important)
  4. 尝试更改媒体查询中显而易见的内容以确保其当前已执行,例如更改背景颜色
  5. 注意:这只是为了试验并找出问题的原因,使用"!important"不推荐

相关问题