Skip to Content
HTML5, JavaScript, and jQuery 24-Hour Trainer
book

HTML5, JavaScript, and jQuery 24-Hour Trainer

by Dane Cameron
February 2015
Intermediate to advanced
408 pages
9h 41m
English
Wrox
Content preview from HTML5, JavaScript, and jQuery 24-Hour Trainer

Lesson 26

CSS3: Part I

Just like HTML, CSS is evolving over time. The latest version of CSS is called CSS3 and adds several important modules to CSS that will be explored over the next two lessons.

Nothing fundamental has changed with CSS in version 3: The language still uses selectors to identify elements and still allows a set of stylistic properties to be defined for these elements. CSS3 is important, however, because it specifies a number of new selectors style properties. Together, these selectors and properties greatly improve the expressiveness of CSS.

Unlike with HTML, you may have noticed that it is not necessary to specify which version of CSS you are using. CSS3 is entirely backwards compatible; therefore, if you want to use CSS3 features, you simply include them in your existing style sheets, and the browser will simply ignore them if it does not support them.

The next two lessons will not provide an exhaustive introduction to CSS3, but they will introduce the most interesting features, and will further help consolidate your knowledge of CSS.

Selectors

CSS3 provides a number of new selectors for selecting elements based on a wider set of criteria.

CSS3 includes one new operator called the tilde operator. This is used to select elements that are siblings of a specified element, and are declared anywhere after that element. For instance, in contacts.css, you might want to style tfoot elements differently if they have a sibling ­element of type thead; this could ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Realtime Web Apps: With HTML5 WebSocket, PHP, and jQuery

Realtime Web Apps: With HTML5 WebSocket, PHP, and jQuery

Jason Lengstorf, Phil Leggetter
jQuery in Action, Third Edition

jQuery in Action, Third Edition

Aurelio De Rosa, Yehuda Katz, Bear Bibeault

Publisher Resources

ISBN: 9781119001171Purchase book