我想在懸停時在圖像上添加多重混合模式效果。現在,當我懸停時,它只是一個頂部不透明的純色層。我嘗試了背景混合模式,但沒有奏效。這裏是我的代碼:如何將混合模式添加到圖像?
.imgwrapper {
position: relative;
}
.showtext:hover + div {
display: block;
}
\t
.showtext:hover {
\t -webkit-filter:blur(2px);
\t filter: blur(2px);
} \t
\t
.imagess:hover > .overlay {
\t left: 0px;
top: 0px;
\t right:0;
\t bottom:0;
width:250px;
height:250px;
position:absolute;
background-color:#b41f24;
opacity:0.85;
border-radius:0px;
}
.overlay #view {
\t position: absolute;
left: 108px;
top: 108px;
color: white;
text-decoration:underline;
display: block;
pointer-events: none;
font-size: 18px;
width: 250px;
letter-spacing: 4px;
}
<a href="single-illustration-sidebar-left.html" class="permalink">
\t \t \t \t \t <div class="desktop-3 mobile-half columns">
\t \t \t \t \t \t <div class="item">
\t \t \t \t \t \t \t <h3>Pawsome</h3>
\t \t \t \t \t \t \t <span class="category">ux/ui, web</span>
\t \t \t \t \t \t \t
\t \t \t \t \t \t \t <div class="imgwrapper">
\t \t \t \t \t <div class="imagess">
\t \t \t \t \t \t \t <img class="showtext" src="images/thumb_item09.png" />
\t \t \t \t \t \t \t <div class="overlay">
\t \t \t \t \t \t \t <div id="view">view</div></div></div></div>
\t \t \t \t \t \t \t
\t \t \t \t \t \t \t </div>
\t \t \t \t \t \t </div><!-- // .item -->
\t \t \t \t \t <!-- // .desktop-3 -->
\t \t \t \t </a>
謝謝
http://jsfiddle.net/apougher/6K6GS/這可能幫助 – 4dgaurav