inline_formatting_05.rml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <rml>
  2. <head>
  3. <title>Inline formatting 05</title>
  4. <link type="text/rcss" href="../style.rcss"/>
  5. <link rel="help" href="https://drafts.csswg.org/css2/#propdef-vertical-align" />
  6. <link rel="help" href="https://drafts.csswg.org/css2/#inline-box-height" />
  7. <meta name="Description" content="Vertical alignment. Stated 'vertical-align' value applies to the blue box." />
  8. <style>
  9. p { color: #45e; }
  10. span {
  11. border-top: 1px #3332;
  12. border-bottom: 1px #3332;
  13. }
  14. sub {
  15. font-size: 10px;
  16. background: #ffd;
  17. vertical-align: sub;
  18. }
  19. .wrapper {
  20. background-color: #eee;
  21. border: 3px #bbb;
  22. margin-bottom: 2em;
  23. }
  24. .line {
  25. background: #fdd;
  26. }
  27. .outer {
  28. font-size: 30px;
  29. background: #ddf;
  30. }
  31. .inner {
  32. font-size: 50px;
  33. background: #dfd;
  34. }
  35. .middle { vertical-align: middle; }
  36. .text-top { vertical-align: text-top; }
  37. </style>
  38. </head>
  39. <body>
  40. <p>vertical-align: baseline</p>
  41. <div class="wrapper">
  42. <span class="line">A <span class="outer"> B<span class="inner">C<sub>d</sub>E</span>F</span> G</span>
  43. </div>
  44. <p>vertical-align: middle</p>
  45. <div class="wrapper">
  46. <span class="line">A <span class="outer middle"> B<span class="inner">C<sub>d</sub>E</span>F</span> G</span>
  47. </div>
  48. <p>vertical-align: text-top</p>
  49. <div class="wrapper">
  50. <span class="line">A <span class="outer text-top"> B<span class="inner">C<sub>d</sub>E</span>F</span> G</span>
  51. </div>
  52. <handle size_target="#document"/>
  53. </body>
  54. </rml>