HTML and CSS Reference
In-Depth Information
1.2.2. CSS3
If you've been developing on the web for a long time, you may remember when styling
HTML documents was facilitated by the use of elements like <font> and the clever use
of <table> elements. Thankfully, the introduction of Cascading Style Sheets has meant
that such approaches are no longer necessary.
As the web has evolved, developers have come up with innovative ways to present content,
using effects like drop shadows, rounded corners, and gradients to improve their applica-
tion's visual appeal. Even more impressive has been the use of transition and animation to
provide better feedback to and interaction with the user. The main issue with all of these
wonderful enhancements is that they've traditionally required a degree of trickery to im-
plement using images and JavaScript (or at least required the use of a JavaScript library).
CSS3 sets out to change that. Table 1.4 lists some of the new style features available in
CSS3—all without JavaScript or the clever use of images.
Table 1.4. A partial list of the new features in CSS3
New selectors
New pseudo-classes
Rounded borders
Border images
Box shadow
Box sizing
Background sizing
Text shadow
Word wrapping
Multiple columns
Web fonts
Multiple backgrounds
Alpha color channels
Media queries
Speech style
3D transforms
2D transforms
As you work through the samples in this topic, you'll learn to build applications primarily
using HTML and JavaScript. We do use CSS3 throughout for styling, but we won't be
covering it in the chapters themselves. You can download the CSS source for all the ex-
amples from the topic's web page. If you're looking for detailed insight into CSS3, check
out Hello! HTML5 and CSS3 (Manning, 2012). Rob Crowther, the author of that book, is
one of this topic's coauthors.
1.2.3. JavaScript and the DOM
JavaScript and the Document Object Model (DOM) play a hugely important role in modern
web applications. The ability to dynamically interact with elements on the page has enabled
developers to provide rich functionality and interactivity previously found only in desktop
applications. The advent of Asynchronous JavaScript and XML (AJAX) has removed the
burden of page refreshes, allowing server-side actions to be updated inline, providing a
Search WWH ::

Custom Search