-webkit-transition: width 2s; /* Safari */ transition: width 2s;
#nav_icon:hover #nav_container { overflow:hidden; height: auto; }
<!DOCTYPE html> <html> <head> <style> div { width: 100px; height: 100px; background: red; -webkit-transition: width 2s; /* For Safari 3.1 to 6.0 */ transition: width 2s; } div:hover { width: 300px; height: auto; } </style> </head> <body> <p><b>Note:</b> This example does not work in Internet Explorer 9 and earlier versions.</p> <div>une chaine</div> <p>Hover over the div element above, to see the transition effect.</p> </body> </html>
4 mai 2017 à 13:36