1
嘗試在引導平臺上使用CSS在圖像上創建類似的效果。有一些難以執行的時間。我想要做的就是在圖片懸停上應用一個透明的過度播放盒子和一個居中的glyp-eye圖標,並且它假設是響應式的。下面是我的代碼和效果截圖:引導圖像懸停覆蓋圖標
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css">
.pdf-thumb-box
{
display: inline-block !important;
position: relative !important;
}
.pdf-thumb-title-active
{
color: #000;
}
.pdf-thumb-box-overlay
{
position: absolute;
background-color: rgba(15, 15, 15, 0.31);
width: 100%;
height: 100%;
}
.pdf-thumb-box-overlay i
{
bottom: 50%;
top: 50%;
position: absolute;
font-size: 40px;
margin-left: -10px;
margin-top: -10px;
}
<div class="container">
<div class="col-md-4">
<div class="pdf-thumb-box">
<a href="#2013-Katalog">
<div class="pdf-thumb-box-overlay">
<div class="center-box"></div><i class="glyphicon glyphicon-eye-open"></i>
</div>
<img class="img-responsive" src="http://i.imgur.com/Cn1ev16.jpg" alt="2013 Genel Katalog">
</a>
</div>
</div>
</div>
感謝這裏的答覆是的jsfiddle網址:http://jsfiddle.net/Tankucukhas/dhs4bfgj/ – 2014-11-08 23:55:15
你想只顯示在眼前徘徊? – vcrzy 2014-11-09 00:06:09
假設是常規圖像,並且一旦將鼠標懸停在圖像上,就需要出現覆蓋層和圖標。 – 2014-11-09 00:09:47