Skip to content

Commit faa4f88

Browse files
committed
Text Overflow:ellipsis
1 parent 444413e commit faa4f88

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

More-CSS/text-overflow-ellipsis.html

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>Text Overflow:ellipsis</title>
7+
<style>
8+
.card {
9+
width: 400px;
10+
background: turquoise;
11+
margin: 0 auto;
12+
}
13+
.card h1 {
14+
text-overflow: ellipsis;
15+
-moz-text-overflow: ellipsis;
16+
white-space: nowrap;
17+
overflow: hidden;
18+
}
19+
h2 {
20+
font-size: 5rem;
21+
background-image: url("https://picsum.photos/200");
22+
-webkit-background-clip: text;
23+
background-clip: text;
24+
color: transparent;
25+
}
26+
</style>
27+
</head>
28+
<body>
29+
<div class="card">
30+
<h1>Lorem ipsum dolor sit amet consectetur, adipisicing elit.</h1>
31+
</div>
32+
<h2>This World Shall Know Pain</h2>
33+
</body>
34+
</html>

0 commit comments

Comments
 (0)