Static website for local motocross track (circa Jun 2004)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

83 lines
2.2 KiB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  4. <head>
  5. <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  6. <title>CSS Fast Rollovers Without Preload - Updated</title>
  7. <style type="text/css">
  8. body {
  9. margin:2em; padding:0;
  10. background: white;
  11. }
  12. #menu {
  13. height: 25px;
  14. margin: 3em 0; padding:0 1em;
  15. border-bottom: 1px solid black;
  16. }
  17. div.outer {
  18. float: left;
  19. width: 120px; height: 25px;
  20. margin: 0 3px 0 0;
  21. background: url( 'bars.gif' ) 0 -50px no-repeat;
  22. }
  23. div.outer a {
  24. display: block;
  25. margin: 0; padding:0;
  26. width:100%; height:100%;
  27. overflow:hidden;
  28. font: bold 13px/1 Georgia, serif;
  29. color:#039;
  30. text-decoration: none;
  31. background: url( 'bars.gif' ) top left no-repeat;
  32. }
  33. div.outer span {
  34. display: block;
  35. margin:0; padding: 7px 0 0 13px;
  36. }
  37. div.outer a:hover {
  38. background-image: none;
  39. color: yellow;
  40. }
  41. div.outer a:active {
  42. color: black;
  43. }
  44. </style>
  45. </head>
  46. <body>
  47. <div id="menu">
  48. <div class="outer"><a href="#"><span>First</span></a></div>
  49. <div class="outer"><a href="#"><span>Second</span></a></div>
  50. <div class="outer"><a href="#"><span>Third</span></a></div>
  51. </div>
  52. <h1>CSS Fast Rollovers Without Preload - Updated</h1>
  53. <p>
  54. Simple yet strong update of the <a href="index.html">Fast Rollovers Without Preload</a> comes from Marek Blaha (Czech author). This workaround solves the problem when Windows IE sometimes slowly reloads the background image causing the element flickers while mouse hovering.
  55. </p>
  56. <p>
  57. The solution is just simple: the background image (moved to the "hover position") is attached to the outer element, and the same background is attached to the inner A element as well (in the "base position" though). The :hover state just changes the A's background to transparent making the 'outer' background bellow visible. Thus, no background is beeing switched and IE has no more reason to flicker.
  58. </p>
  59. <p>
  60. Check the source code of this document to see the solution at work. It works fine in every browser I've met...
  61. </p>
  62. <hr />
  63. <p>
  64. Posted by <a href="http://www.pixy.cz">Petr Stanicek [aka -pixy-]</a>, 2003-11-27,00.05 CET
  65. </p>
  66. </body>
  67. </html>