2014-08-27 43 views
0

我在我的HTML頁面中插入了一個模式。 我想提出的標題鏈接無法點擊,而模態顯示(屏幕截圖在這裏:http://prntscr.com/4gyn61在陰影下創建html鏈接不可點擊

這裏是我的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> 

有人有想法嗎?

編輯:只有標題。

+0

只是標題鏈接或everthing不在模態內? – 2014-08-27 13:12:51

+0

什麼是「shadown」? – bhantol 2014-08-27 13:17:11

回答

2

我做了一個簡單的小提琴展示如何做到這一點:

http://jsfiddle.net/o261o9gk/

我的方法是使用一個div覆蓋的影子:

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

Basicaly,固定股利獲得點擊而不是你的頁面的內容。