Jump to content

Changing the direction of a transition in css


pepijnschnitzeler

Recommended Posts

Hello,I want to make a transition of a pop-up div using the css3 transition feature. However I can't seem to figure out how to change the direction of the transition. I used this example to experiment with it but I cannot let the block expand from the right to the left.

<!DOCTYPE html><html><head><style>div{width:100px;height:100px;background:red;transition:width 2s;-webkit-transition:width 2s; /* Safari */}div:hover{width:300px;}</style></head><body><p><b>Note:</b> This example does not work in Internet Explorer 9 and earlier versions.</p><div></div><p>Hover over the div element above, to see the transition effect.</p></body></html>

Can you guys help me?Thanks in advance,Pepijn

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...