Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 31st, 2012  |  syntax: None  |  size: 0.40 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Change property of all instances of element on hover (CSS)
  2. <div class="hover-test">
  3.     <article class="post">ABC</article>
  4.     <article class="post">ABC</article>
  5.     <article class="post">ABC</article>
  6.     <article class="post">ABC</article>
  7. </div>
  8.        
  9. .post:hover {
  10. background-color:green;
  11. }
  12.  
  13. .hover-test:hover .post {
  14. background-color: white;
  15. }
  16.  
  17. .hover-test:hover .post:hover {
  18. background-color: green;
  19. }