028-background-image.html 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>028 background-image</title>
  6. <style>
  7. html, body { margin: 0; padding: 0; background: #ffffff; color: #202020; }
  8. body { font-family: sans-serif; font-size: 13px; }
  9. h1 { font-size: 20px; margin: 10px 0 4px 10px; }
  10. p { margin: 0 0 10px 10px; }
  11. .pane { float: left; width: 440px; margin-left: 10px; }
  12. .label { background: #eeeeee; padding: 4px 6px; margin-bottom: 4px; }
  13. .stage { background: #ffffff; padding: 8px; border: 1px solid #999999; }
  14. .bg { width: 194px; height: 122px; background-image: url(PIC.BMP); }
  15. .after { background: #333333; color: #ffffff; height: 24px; margin-top: 8px; padding-left: 4px; }
  16. </style>
  17. </head>
  18. <body>
  19. <h1>028 &middot; background-image</h1>
  20. <p>The two images must be identical.</p>
  21. <div class="pane">
  22. <div class="label">A: background-image: url(PIC.BMP)</div>
  23. <div class="stage">
  24. <div class="bg"></div>
  25. <div class="after">after</div>
  26. </div>
  27. </div>
  28. <div class="pane">
  29. <div class="label">B: inline image reference</div>
  30. <div class="stage">
  31. <img src="PIC.BMP" width="194" height="122" alt="PIC.BMP">
  32. <div class="after">after</div>
  33. </div>
  34. </div>
  35. </body>
  36. </html>