如何使連結覆蓋整個圖像?
我希望連結覆蓋所有圖像,不僅是在中心,而且當您將滑鼠懸停在圖像上時。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | .moduledata{
position : relative ;
width : auto ;
margin : 0px !important ;
max-width : 380px ;
}
.moduledata > h 5 {
position : absolute ;
left : 50% ;
top : 50% ;
transform: translate( -50% , -50% );
}
.moduledata > h 5 > a {
color : #000000 ;
font-weight : 300 ;
font-size : 38px ;
}
.moduledata:hover h 5 {
visibility : visible ;
}
.moduledata h 5 {
visibility : hidden ;
}
|
1 2 3 4 | < div class = "moduledata" >
< h5 >< a href = "{{seourl}}" >{{title}}</ a ></ h5 >
< figure >< img src = "{{pageThumb}}" /></ figure >
</ div >
|