| <!DOCTYPE html> |
| <!-- |
| | When the "text-overflow" property is set to "ellipsis" an ellipsis |
| | character is rendered to represent clipped inline content. |
| | "For the ellipsis..., implementations must hide characters and |
| | atomic inline-level elements at the applicable edge(s) of the |
| | line as necessary to fit the ellipsis/string." While the first |
| | atomic inline-level element is clipped, the second must be ellipsed. |
| | Because an atomic inline-level element is treated as a single opaque |
| | box by the inline box, its margins should be treated the same as |
| | its content. |
| | https://www.w3.org/TR/css3-ui/#propdef-text-overflow |
| | https://www.w3.org/TR/CSS21/visuren.html#inline-boxes |
| --> |
| <html> |
| <head> |
| <meta charset="utf-8"> |
| <style> |
| body { |
| margin: 0px; |
| font-family: Roboto; |
| font-size: 20px; |
| } |
| #div1 { |
| white-space: nowrap; |
| width: 180px; |
| overflow: hidden; |
| text-overflow: ellipsis; |
| border: 1px solid #000000; |
| } |
| video { |
| background-color: #888888; |
| } |
| span { |
| background-color: #888888; |
| display: inline-block; |
| } |
| #span1 { |
| width: 150px; |
| } |
| #span2 { |
| width: 80px; |
| margin: 20px 40px 20px 40px; |
| } |
| #video1 { |
| width: 150px; |
| height: 30px; |
| } |
| #video2 { |
| width: 80px; |
| height: 30px; |
| margin: 20px 40px 20px 40px; |
| } |
| </style> |
| </head> |
| <body> |
| <div> |
| <div dir="ltr" id="div1"> |
| <span id="span1">Span1</span> |
| <span id="span2">Span2</span> |
| </div> |
| <div dir="ltr" id="div1"> |
| <video id="video1"></video> |
| <video id="video2"></video> |
| </div> |
| <div dir="rtl" id="div1"> |
| <span id="span1">Span1</span> |
| <span id="span2">Span2</span> |
| </div> |
| <div dir="rtl" id="div1"> |
| <video id="video1"></video> |
| <video id="video2"></video> |
| </div> |
| </div> |
| </body> |
| </html> |