Created
March 23, 2021 12:25
-
-
Save Alkimisti/80d85d721f91b5521117fc76c9fad0ce to your computer and use it in GitHub Desktop.
This file contains 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"> | |
<meta name="viewport" | |
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>text-overflow</title> | |
<style> | |
#clip { | |
white-space: nowrap; | |
width: 150px; | |
overflow: hidden; | |
text-overflow: clip; | |
border: 1px solid #000000; | |
} | |
#ellipsis { | |
white-space: nowrap; | |
width: 150px; | |
overflow: hidden; | |
text-overflow: ellipsis; | |
border: 1px solid #000000; | |
} | |
#custom { | |
white-space: nowrap; | |
width: 150px; | |
overflow: hidden; | |
text-overflow: "***"; | |
border: 1px solid #000000; | |
} | |
</style> | |
</head> | |
<body> | |
<h2>text-overflow: clip:</h2> | |
<div id="clip">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Expedita, voluptatum?</div> | |
<h2>text-overflow: ellipsis:</h2> | |
<div id="ellipsis">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Consequuntur, natus.</div> | |
<h2>text-overflow: "***" (Firefox):</h2> | |
<div id="custom">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Enim, odio!</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment