我想添加一些懸停選擇器爲我目前正在開發的頁面圖像,但因爲我指向圖像上的光標,懸停工作正常,但位置有點不對,因爲它出現在接近它的內容下。我試過使用z-index和職位。還有一件事,我也想讓它從div的中心放大,然後從角落放大。 ?任何幫助,看看這個小提琴懸停圖片位於其他內容
CSS:
html, body {
margin: 0;
height: 100%;
}
.management_wrapper{
text-align: center;
max-width: 80%; ;
height:auto;
background-color: white;
padding-top: 0%;
padding-bottom: 10%;
position: relative;
overflow: auto;
margin-left: 5%;
}
#list_box{
margin-top: 1%;
width: 15%;
height:20%;
float:left;
background-color:beige;
margin-right:1%;
position: relative;
}
#info{
margin-top: 1%;
width: 15%;
height:20%;
float:left;
color: white;
margin-right: 1%;
position: relative;
}
#info p{
margin-top: 20%;
color: ;
}
.img_size {
width: 100%;
height:100%;
}
.img_size:hover{
width: 300px;
height:300px;
position: relative;
}
HTML:
<center>
<div id="info" style="background-color: #800000 "></div>
<div id="info" style="background-color: #280000 ;">
<p> Elena H. Dimailig
Managing Director </p>
</div>
<div id="list_box">
<center>
<img id="img_size" src="images/main/3.jpg">
</center>
</div>
<center>
<div id="info" style="background-color: #800000 ">
<p> Joel Molina
Assistant Account Manager </p>
</div>
<div id="list_box">
<center>
<img class="img_size" src="images/main/molina.jpg">
</center>
</div>
<div id="info" style="background-color: #180000 "></div>
https://jsfiddle.net/qz6s2vps/1/
的URL鏈接到jsfiddle的主頁。請更新它 – Robert
請更正網址,似乎你忘了添加確切的網址:) – pradeep1991singh
對不起,再次檢查它。 – grasig