Hi,
What is the main difference between CSS2 and CSS3?
Thanks
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Lalit MPosted Sep 29, 2011, 12:33 AM
CSS 3 supports multiple backgrounds, but in CSS2 you cannot.
Read More here
Hemant KumarPosted Sep 29, 2011, 12:26 AM
The biggest difference between CSS2 and CSS3 is that CSS3 has been split up into different sections, called modules. Each of these modules is making it's way through the W3C in various stages of the recommendation process. CSS2 was submitted as a single document with all the Cascading Style Sheets information within it. Because each of the modules is being worked on individually, we have a much wider range of browser support for CSS3 modules. As with any new specification, be sure to test your CSS3 pages thoroughly in as many browsers and operating systems as you can.
New CSS3 Selectors
CSS3 offers a bunch of new ways you can write CSS rules with new CSS selectors, as well as a new combinator, and some new pseudo-elements.
Three new attribute selectors:
16 new pseudo-classes:
The root element of the document. In HTML this is always
use this to match exact child elements or use variables to get alternating matches
match exact child elements counting up from the last one
match sibling elements with the same name before it in the document tree
match sibling elements with the same name counting up from the bottom
match the last child element of the parent
match the first sibling element of that type
match the last sibling element of that type
match the element that is the only child of its parent
match the element that is the only one of its type
match the element that has no children (including text nodes)
match an element that is the target of the referring URI
match the element when it's enabled
match the element when it's disabled
match the element when it's checked (radio button or checkbox)
match when the element does not match the simple selector s
One new combinator:
match when elementB follows somewhere after elementA, not necessarily immediately