| <!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." | |
| | https://www.w3.org/TR/css3-ui/#propdef-text-overflow | |
| --> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <style> | |
| body { | |
| margin: 0px; | |
| font-family: Roboto; | |
| font-size: 20px; | |
| } | |
| div { | |
| white-space: nowrap; | |
| width: 200px; | |
| overflow: hidden; | |
| text-overflow: ellipsis; | |
| border: 1px solid #000000; | |
| } | |
| span { | |
| background-color: #888888; | |
| display: inline-block; | |
| } | |
| video { | |
| width: 150px; | |
| background-color: #888888; | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <div> | |
| <div dir="ltr">This is some<span> long text that will not fit in the box</span></div> | |
| <div dir="ltr">This is some<video></video></div> | |
| <div dir="rtl">This is some<span> long text that will not fit in the box</span></div> | |
| <div dir="rtl">This is some<video></video></div> | |
| </div> | |
| </body> | |
| </html> |