Jump to content

css3 transition property not working:(

- - - - -

  • Please log in to reply
2 replies to this topic

#1
opensam

opensam

    Newbie

  • Members
  • Pip
  • 2 posts
guys i m using chrome 11.0.696.71 doc type

<!DOCTYPE html PUBtdC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">




<html xmlns="http://www.w3.org/1999/xhtml">


and code
div
{
transition: width 2s;
-moz-transition: width 2s;
-webkit-transition: width 2s;
-o-transition: width 2s;
}
this code is not working at all...
sos

#2
wim DC

wim DC

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,084 posts
  • Programming Language:Java, JavaScript, PL/SQL
  • Learning:Java
It DOES work, it just doesn't do anything. You just say that if the width changes, to do it in 2 seconds. But you never change the width.
Use this instead and you see it change when you hover over it with your mouse:

         <style type="text/css">	

		div{		

			width: 100px;

			background-color: red;

			transition: width 2s;

			-moz-transition: width 2s; 

			-webkit-transition: width 2s;

			-o-transition: width 2s; 

		} 

		

		div:hover{

			width: 200px;

		}

	</style>



#3
opensam

opensam

    Newbie

  • Members
  • Pip
  • 2 posts
thanx a ton buddy




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users