Last active
November 18, 2016 03:16
-
-
Save wuliupo/b463988a5d06ffea9b8020d335dc469c to your computer and use it in GitHub Desktop.
CSS ellipsis
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>CSS ellipsis</title> | |
| </head> | |
| <style> | |
| div { | |
| margin: 20px auto; | |
| border: 1px solid #CCC; | |
| width: 200px; | |
| height: 20px; | |
| line-height: 20px; | |
| overflow: hidden; | |
| word-break: break-all; | |
| word-wrap: break-word; | |
| white-space: nowrap; | |
| text-overflow: clip; | |
| text-overflow: ellipsis; | |
| text-overflow: "…"; | |
| } | |
| </style> | |
| <body> | |
| <div>longest word: pneumonoultramicroscopicsilicovolcanoconiosis</div> | |
| <div>Overflow behavior at line end Right end if ltr, left end if rtl</div> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment