Using New CSS3 Selectors

not - Inverse selection -Imagine you wanted to apply to all the paragraph that not members of the special class:

p:not(.special) {
   border: 1px solid red;
}

nth-child selector allows you to select one or more elements in a group.

#myList>li:nth-child(1){
   border: 1px solid blue;
}


Other new pseudo-classes - AH267

:hover: The :hover pseudo-class has been a part of CSS from the beginning, but it was officially defined only for the tag. Now the pseudo-class can be applied to any element. If the mouse (or other pointing device) is over an element, that element has the hover state activated. Note that mobile devices don't always support hover because the position of the pointing device (the stylus or finger) isn't known until the item is activated. Mobile devices may have some sort of tabbing mechanism to indicate which item is being hovered over.

:focus: The :focus pseudo-class is activated when an element is ready to receive keyboard input.

:active: A form element is active when it is currently being used: for example, when a button has been pressed but not yet released. Mobile devices often skip directly to active mode without going through hover mode. This can be an important design consideration when using state for styling.

There were no examples in the book.

My Name is William J. Benedek   It worked!

:hover: The :hover pseudo-class has been a part of CSS from the beginning, but it was officially defined only for the tag. Now the pseudo-class can be applied to any element. If the mouse (or other pointing device) is over an element, that element has the hover state activated. Note that mobile devices don't always support hover because the position of the pointing device (the stylus or finger) isn't known until the item is activated. Mobile devices may have some sort of tabbing mechanism to indicate which item is being hovered over.

In the above paragraph I placed an <a> in front of the word 'Mobile' in the last sentence. To highlight four words I placed the tag, </a> after the word, 'have'. The experiment worked.

Now I shall try to use it inline with more elements.

In fact, you may want to invent your own elements. Perhaps you want a particular style, but it's not quite a paragraph.

The above did not quite worked. The selected words are immediately appear large, and the color is not green on hovering, but pink.

3 vspace