CSS Property Value How to - transition: 1s;








Question

We would like to know how to transition: 1s;.

Answer


<!DOCTYPE html>
<html>
<head>
<title>CSS Transition vs Zoom - jsFiddle demo by fireman_biff</title>
<style type='text/css'>
div {<!-- ww w .  ja va2 s  . c  o  m-->
  background: red;
  height: 200px;
  width: 200px;
  -moz-transition: 1s;
  -webkit-transition: 1s;
  transition: 1s;
}

div:hover {
  height: 300px;
  width: 300px;
}
</style>
</head>
<body>
  <div></div>
</body>
</html>

The code above is rendered as follows: