我寫了下面的代碼創建了動畫界/圖標應導致另一頁:爲什麼我的'a href'鏈接在'divs'裏面不起作用?
<html>
<body>
<div id="homepageBanner"><img src="images/eris-background.jpg" width="100%" height="500px;" ; />
<div id="LPRCircle">
<center>
<div class="CircleContainer">
<a href="Eris-LPR.html"><h5>LPR/ANPR</h5></a>
<center>
<div><img src="images/circles/LPR_Normal.jpg" width="280px;" class="imgCircle" /></div>
</center>
</div>
</center>
</div>
</div>
</body>
</html>
這是CSS:
#LPRCircle {
height: 250px;
width: 250px;
border: 4px solid rgb(30, 154, 148);
position: absolute;
left: 10%;
top: 290px;
overflow: hidden;
background: rgba(30, 154, 148, 0.5);
margin-right: 4px;
-webkit-box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
-webkit-border-radius: 135px;
-moz-border-radius: 135px;
border-radius: 135px;
z-index: 3;
}
.CircleContainer {
z-index: 4;
}
#LPRCircle a {
text-align: center;
width: 100%;
height: 100%;
display: block;
color: #333;
position: page;
vertical-align: central;
text-decoration: none;
}
#LPRCircle:hover a h2 {
color: rgb(48, 48, 48);
}
#LPRCircle .CircleContainer .imgCircle {
opacity: 0;
visibility: hidden;
left: -25px;
top: -20px;
position: absolute;
transition: opacity 0.5s linear;
-moz-transition: opacity 0.5s linear;
-webkit-transition: opacity 0.5s linear;
z-index: 2;
}
#LPRCircle .CircleContainer:hover .imgCircle {
opacity: 1;
visibility: visible;
transition: opacity 0.5s linear;
-moz-transition: opacity 0.5s linear;
-webkit-transition: opacity 0.5s linear;
z-index: 2;
}
我想,問題是什麼鏈接重疊,或者鏈接在很多div中不起作用。我不確定,但問題是,當我點擊包含鏈接的圓圈時,什麼也沒有發生。
能否請您在plunker添加在線協作活生生的例子或JSbin,如:https://plnkr.co/edit/1lt5z7yVNde7Vu1WoMA0?p=preview –
我試圖做在線現場演示,但直到我這樣做,現場示例上傳到網站:www.eris-co.com。問題是關於主頁上的四個圓圈。 –
因爲您的標記無效!在HTML5中居中使用CSS選擇器! –