Using a transition when enlarging an image doesn’t seem to work in chrome.
HTML:
<img src="foobar.png">
CSS:
img
{
float: left;
margin-right: 10px;
border-radius: 10px;
width: 200px;
-webkit-transition: width 1s ease, height 1s ease;
}
img:hover
{
width: 100%;
}
Fiddle: http://jsfiddle.net/6Dk4D/
What is wrong?
It won’t work with percentages it seems. Also, if you wish to transition
heightas well, you need to declare it in the orignalimgstyling. Shown here: http://jsfiddle.net/Skooljester/6Dk4D/1/ it works if you specify awidthin pixels for the hover.Edit: If you specify the first
widthas a percentage then the second can be defined with a percent as well and still work. Thank you Tyilo