Working with CSS3 property transform: scale
, I found interesting issue. I wanted to make a little zoom effect for pictures. But when I used for the parent div <
Here is the Solution.
The HTML:
The CSS:
.wrap{
width: 400px;
height: 260px;
overflow: hidden;
border-radius: 15px;
border:1px solid transparent;
}
div.image{
background: url(http://blog.dothegreenthing.com/wp-content/uploads/2012/10/take-a-smile.jpg) no-repeat;
width: 400px;
height: 260px;
}
div.image:hover{
-webkit-transform: scale(1.2, 1.2);
transform: scale(1.2, 1.2);
cursor: pointer;
border:1px solid transparent;
}
Chrome needs a transparent border
surrounding the box.
Hope this helps.