Using the Dreamweaver CS5 HTML5 Pack to Create CSS3 Transforms
Many effects that used to require JavaScript, Flash, or using images to convey stylized type can now be implemented with nothing more than CSS style sheets. This development makes it easier to generate type or images with effects such as rotation, scaling, or skewing. Presenting effects with CSS even allows visitors to copy-and-paste text and images to which these effects have been applied.
These new features in CSS3 are part of a complex and rapidly shifting landscape in web design. CSS3 and its partner, HTML5, can be used to create effects that traditionally have been implemented with much more difficulty by using Flash or JavaScript. Another factor driving designers to HTML5 and CSS3 is Apple's current position not to support Flash.
My articles "Presenting HTML5 Video with Dreamweaver CS5" and "Embedding HTML5 Audio with Dreamweaver CS5" walked through the process of using the Audio and Video elements in HTML5 to embed media directly in a web page, without relying on an external plug-in media player such as Flash Player, QuickTime Player, or Windows Media Player. In this article, I'll show you how to implement CSS3 to define two-dimensional (2D) transforms (also called transformations).
Creating CSS3 code for new effects takes some work; the process isn't as user-friendly as we might wish. But Dreamweaver's HTML5 Pack supplies helpful tools that make the process easier. For this tutorial, I chose to explore 2D effects such as rotation, scaling, and skewing because they're among the most widely supported of the new generation of CSS-based effects. The 2D effects can be viewed in Firefox, Opera, and Apple's Safari browser. Other CSS3 effects, such as animation and 3D effects, are supported only in Safari.
Another nice thing about 2D transforms: If a visitor's browser doesn't support the effect, the content is still accessible; it just displays without the effect. For those reasons, plus the fact that 2D effects provide a good template on which to learn how to use CSS3 effects, this tutorial focuses on using the skew, scale, rotate, and translate 2D effects.
Using Dreamweaver to Create CSS3 Styles
In this tutorial, I'll show you how to take advantage of new code hints available through the HTML5 Pack. The HTML5 Pack constitutes a qualitative upgrade to Dreamweaver CS5something that in an earlier era would have been branded Dreamweaver CS5.1. The HTML5 Pack was released very shortly after (and to some degree in response to) Steve Jobs' declaration that Apple mobile devices would never support Flash.
Anyone fluent in HTML5 and CSS3 can use Dreamweaver's Code view to write custom code and implement HTML5 and CSS3 features. For the code-challenged among us, new features in the HTML5 Pack make this process much easier. You cannot view, add, or edit the new CSS3 style features in Dreamweaver's CSS Styles panel, but the HTML5 Pack gives you code hints in Code view that make it much easier to apply those CSS3 effects.
The full HTML5 Pack works only with Dreamweaver CS5. Fortunately, in June 2010 Adobe released a version of the HTML5 Pack for Dreamweaver CS3 and CS4 that supports a limited set of features, and those features include CSS3 code hints! So this tutorial works for CS3 and CS4although your interface will look a bit different from the CS5 interface displayed in the figures I've included here.