01-visual.html 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
  2. <HTML>
  3. <HEAD>
  4. <TITLE>Example of inline flow on several lines</TITLE>
  5. <STYLE type="text/css">
  6. * {
  7. padding: 0;
  8. margin: 0;
  9. }
  10. #inlineblock {
  11. background-color: red;
  12. display: inline-block;
  13. margin: 30px;
  14. }
  15. #block {
  16. background-color: blue;
  17. display: block;
  18. margin: 30px;
  19. }
  20. div {
  21. background-color: yellow;
  22. width: 50px;
  23. height: 50px;
  24. }
  25. </STYLE>
  26. </HEAD>
  27. <BODY>
  28. <p id="p1">This value causes an element to generate an
  29. <span id="block">inline-level block container</span>.
  30. The inside
  31. of an inline-block is formatted as a block box, and the element itself is formatted as an atomic inline-level
  32. box.This value causes an element
  33. <span id="inlineblock">(e.g., LI in HTML)
  34. <div>你好惨</div>
  35. </span>
  36. to generate a principal
  37. block box and a marker box. For information about lists and examples of list formatting, please consult the section
  38. on lists.The 'position' and 'float' properties determine which of the CSS 2.1 positioning algorithms is used to
  39. calculate the position of a box.
  40. </p>
  41. </BODY>
  42. </HTML>