Saturday 15 January 2011

css3 - Change the color of text within a hovered li by css -


I'm thinking that it is possible to update the color of a text within a Li-Block, if it is Li-Block

Therefore, like that situation

  ; Li & gt; & Lt; H3 & gt; Foo & lt; / H3 & gt; & Lt; P & gt; Supertext & lt; / P & gt; & Lt; / Li & gt;  

and I have

  li: hover {background: red; }  

And I also want to be able to

  li: hover {background: red; Color: Green! Important; // but it does not work}  

Any chance to do this by CSS?

Add it to your CSS:

  li: hover p { Art color; Background color: white; } Li: Hover H3 {color: black; Background color: white; }  

(change colors accordingly)

Or you can add hover to this list item instead:

  Lee P: hover {color: black; Background color: red; } Lee H3: Hover {Color: Black; Background color: red; }  

You can also wrap the element within the list items within a period and add a common duration style for both.


No comments:

Post a Comment