I need a sort of X shape over an image on hover. But not the whole "X", just the outer bits. This is the image from my designer:
I've got a nice "X" shape on hover here:
#xdiv {
width: 200px;
height: 200px;
border: 1px solid #999;
background-image: url('http://placehold.it/200x200');
}
#xdiv:hover {
cursor: pointer;
opacity: .4;
}
#xdiv:hover .xdiv1 {
height: 200px;
width: 1px;
margin-left: 100px;
background-color: #333;
transform: rotate(45deg);
-ms-transform: rotate(45deg);
/* IE 9 */
-webkit-transform: rotate(45deg);
/* Safari and Chrome */
z-index: 1;
}
#xdiv:hover .xdiv2 {
height: 200px;
width: 1px;
background-color: #333;
transform: rotate(90deg);
-ms-transform: rotate(90deg);
/* IE 9 */
-webkit-transform: rotate(90deg);
/* Safari and Chrome */
z-index: 2;
}
<div id="xdiv">
<div class="xdiv1">
<div class="xdiv2"></div>
</div>
</div>
That I modified from this answer.
Going by my designer's example, is this possible using CSS and not using another image on hover?