Advertisement
florin88

CSS: link sfumato al passaggio del mouse

Mar 12th, 2014
449
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.96 KB | None | 0 0
  1. <html>
  2. <head>
  3.  
  4. <style>   <!-- questa è la parte CSS che ci interessa -->
  5.     .link{  
  6.      opacity: 1.0;   <!-- stadio iniziale del link. cioè la sua opacità iniziale -->
  7.      text‐decoration: none;  
  8.      background: #1e9827;   <!-- colore primario -->
  9.      width: 50px;  
  10.     }  
  11.        
  12.     .link:hover{  
  13.      opacity: 0.5;   <!-- stadio secondario del link. cioè la sua opacità quando si passa sopra -->
  14.      text‐decoration: none;  
  15.      background: #3bc545;  <!-- colore secondario -->
  16.     }  
  17.     </style>  
  18.  
  19. </head>
  20.  
  21. <body>
  22. <div> <!-- menù orizzontale -->
  23. <ul>
  24. <a href="#" class="link">Link 1</a>
  25. <a href="#" class="link">Link 2</a>  
  26. <a href="#" class="link">Link 3</a>
  27. </ul>
  28.  
  29. </div>
  30. <p><b>OPPURE</b></p>
  31. <div>
  32. <ul>  <!-- menù verticale -->
  33. <li><a href="#" class="link">Link 1</a></li>
  34. <li><a href="#" class="link">Link 2</a></li>  
  35. <li><a href="#" class="link">Link 3</a></li>
  36. </ul>
  37. </div>
  38.  
  39. </body>
  40.  
  41. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement