你需要調整一下你的風格來達到這個目的。
爲您的覆蓋範圍添加保證金div
因此main
可見。同樣,調整箭頭的位置和相應的文字,使其到達適當的位置。
請注意,如果該框在視覺上內部與carmin
演示中一樣,此解決方案將無法正常工作。
updated jsFiddle
更新CSS:
*{
margin: 0px;
padding: 0px;
}
#overlay{
font-family: "Comic Sans MS", cursive, sans-serif;
position: fixed;
width: 100%;
height: 100%;
margin-top: 120px;
z-index: 999999;
background-color: #000;
opacity:0.5;
-webkit-transition: all 0.3s ease-out;
-moz-transition: all 0.3s ease-out;
-ms-transition: all 0.3s ease-out;
-o-transition: all 0.3s ease-out;
transition: all 0.3s ease-out;
}
#overlay p, #overlay img{
position: relative;
}
#overlay p{
color: blue;
}
#instruction1{
top: 50px;
left: 400px;
}
#arrow1{
width: 100px;
position: relative;
top: -30px;
left: 150px;
}
#instruction2{
top: -10px;
left: 225px;
}
#dismiss{
font-size: 12px;
}
.shome{
display: block;
}
main{
z-index: 0;
}
main div{
padding: 50px;
background: rgb(0,120,170);color:#fff;
z-index: 9999999;
opacity: 0.8;
}
您對'highlight'有什麼意思? – empiric