CSS Transitions in Dreamweaver CS6

 

This article showcases various ways in which you can use CSS transitions in your Dreamweaver CS6 project.It also describes the options in the user interface that allow you to configure the options for these transitions.

What is CSS Transition?

CSS Transitions allows property changes in CSS values to occur smoothly over a specified duration.Normally when the value of a CSS property changes, the rendered result is instantly updated. The affected elements immediately transition from the old property value to the new property value.

For a smooth transition between property changes, you can use the following CSS transition properties:

The ‘transition-property’ Property
The ‘transition-duration’ Property
The ‘transition-timing-function’ Property
The ‘transition-delay’ Property
The ‘transition’ Shorthand Property

We will discuss each of these in our examples later.

For more information please refer to CSS Transition page at http://www.w3.org/TR/css3-transitions/

Browser Support

* From http://caniuse.com/

 

As you can see CSS transitions have reasonable support in all Browsers except IE.

Using CSS transitions in Dreamweaver CS6?

Example 1 – Menus – Download Demo File

Open the downloaded file in Dreamweaver CS6. This is a simple menu using lists.

On mouse over of the menu, I would like to do the following:

·         Smoothly transition the background color of each menu option to a specified color
·         Smoothly increase the size of the option to 1.5 times its current size so that it appears bigger than the other options

Adding CSS transition in Dreamweaver

Step 1 – Open CSS Transitions panel using Window>CSS Transitions

Step 2 - Click on the + to Create Transition.

 

Step 3 – Select target rule. In this file, I am specifying a transition rule for the hyperlink property. So, I select <a> from the menu.

Step 4 – Because I want the same transition to be applied to all the hyperlinks,  I select Use The Same Transition For All Properties. I will further specify a 2 second duration for the transition. You can also specify a delay which specifies the time required to start the transition from the time of the mouse-over. In this case, I want the transition to to start immediately, so I will leave it blank. For timing, you can choose from the preset values or specify your own cubic-bezier function by providing the required values.

Example – The ease-in function is equivalent to cubic-bezier(0.42, 0, 1.0, 1.0).

Step 5 - Now we need the select the properties and change the CSS Values.In this example we will select background-color and transform.

Click + below the Property field, and select background-color from the menu.

Similarly, to specify the Scale options, click +, and select Transform. We will use CSS3 Transform to scale to 1.5.

Click on Create and we are done. Notice that Dreamweaver adds all the vendor specific code for transition as well as Transform.

 

Dreamweaver allows you to edit the transition anytime. Double-click a transition you want to edit. For example, to specify Rotate instead of Scale for the Transform property, double-click Transform in the Property field.

To Learn More on CSS3 Transitions please refer to the links below :

 

Share your thoughts

Your email address will not be published. Required fields are marked *

*


9 − = one