Tell me, please, how to make a link on a clickable block? I think that the problem is in the z-index property, but for some reason it cannot be fixed. Tell me please.
.test img{ width:100%; transition: all 0.6s ease-in-out 0s; position:relative; z-index:2; } .view a{ z-index:3; } .test img:hover { opacity:0.1; cursor:pointer; transform: scale(2) rotate(10deg); } .test { overflow:hidden; box-shadow: 0px 0px 20px 7px rgba(0,0,0,0.7); height:200px; margin-bottom:15px; -webkit-transform: translateZ(0) scale(1.0, 1.0); } .view { position:absolute; top:0; left:0; width:100%; height:100%; cursor:pointer; background-color:rgba(0,0,0,0.1); z-index:1; }
<div class="span12 test"> <img src="https://pp.vk.me/c615817/v615817671/19ee1/_QYeeox-ysU.jpg" alt="Core Values"> <div class="view"> <a href="http://www.google.ru">Ссылка на блоке</a> </div> </div> <a href="http://www.google.ru">Ссылка вне блока</a>