html - 使阴影下的html链接不可点击

标签 html css

我在我的 HTML 页面中插入了一个模式。 我想让标题链接在模式显示时不可点击(此处的屏幕截图:http://prntscr.com/4gyn61)

这是我的CSS:

 .modal {
  display: none;
  width: 600px;
  height: 800px;
  z-index: 999 !important; \\I use this to display it over the header.
  background: #fff;
  padding: 15px 30px;
  -webkit-border-radius: 8px;
  -moz-border-radius: 8px;
  -o-border-radius: 8px;
  -ms-border-radius: 8px;
  border-radius: 8px;
  box-shadow: inset 0 20px 40px -20px #000; 
  -webkit-box-shadow: 0 0 10px #000;
  -moz-box-shadow: 0 0 10px #000;
  -o-box-shadow: 0 0 10px #000;
  -ms-box-shadow: 0 0 10px #000;
  box-shadow: 0 0 10px #000;
}

和模态的html:

<div id="ex1" style="display:none;">
    <p class="curr"> <?php include 'mypagewithtext.html'; ?></p>
  </div>

有人知道吗?

编辑:只有标题。

最佳答案

我做了一个简单的 fiddle 来展示如何去做:

http://jsfiddle.net/o261o9gk/

我的技术是使用 div 叠加层作为阴影:

.overlay{
    position:fixed;
    top:0;
    left:0;
    background-color:black;
    width:100%;
    height:100%;
    opacity:0.4;
}

基本上,固定的 div 而不是页面内容获得点击。

关于html - 使阴影下的html链接不可点击,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25528045/

相关文章:

php - 更新数据库中的正确字段

javascript - 通过 d3 嵌入图像不起作用

html - css 打印模式 : display header and footer only on first page of a generated word doc

php - 按数据库中的顺序显示带有标题的图像

css - 如何合并 CSS 类?

css - 如何使输入/文本占据 Bootstrap 4 中 div 的整个宽度?

javascript - 我可以根据浏览器的缩放比例调整图像大小吗?

html - 右上角带有图标的文本

php - 无法获取 url 的最后一部分

html - CSS:相对于元素的背景位置