-
Notifications
You must be signed in to change notification settings - Fork 7
/
ellipsis-link-example.html
72 lines (62 loc) · 2.74 KB
/
ellipsis-link-example.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="ellipsis.css">
<style>
/* page specific styling */
.ellipsis-container {
border: 5px solid #AAA;
width: 200px;
height: 200px;
}
.ellipsis-content {
/* it's critical to set a fixed font-size and line-height in order for
the ellipsis position to be predictable */
font-size: 16px;
line-height: 18px;
}
.ellipsis {
/* set width of ellipsis. width must equal margin-left */
width: 60px;
margin-left: -60px;
/* set ellipsis position */
bottom: 22px;
left: 201px;
/* add a gradient background */
background: -webkit-gradient(linear, left top, right top,
from(rgba(255, 255, 255, 0)), to(white), color-stop(50%, white));
background: -moz-linear-gradient(to right, rgba(255, 255, 255, 0), white 50%, white);
background: -o-linear-gradient(to right, rgba(255, 255, 255, 0), white 50%, white);
background: -ms-linear-gradient(to right, rgba(255, 255, 255, 0), white 50%, white);
background: linear-gradient(to right, rgba(255, 255, 255, 0), white 50%, white);
}
/* make the ellipsis a link */
.ellipsis a {
text-decoration: none;
display: inline-block;
font-size: 16px;
height: 16px;
background-color: #ddd;
border-radius: 3px;
margin-right: 3px;
padding: 3px;
line-height: 5px;
box-sizing: border-box;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
}
</style>
</head>
<body>
<div class="ellipsis-container">
<div class="ellipsis-wrapper">
<p class="ellipsis-content">
Call me Ishmael. Some years ago – never mind how long precisely – having little or no money in my purse, and nothing particular to interest me on shore, I thought I would sail about a little and see the watery part of the world. It is a way I have of driving off the spleen, and regulating the circulation. Whenever I find myself growing grim about the mouth; whenever it is a damp, drizzly November in my soul; whenever I find myself involuntarily pausing before coffin warehouses, and bringing up the rear of every funeral I meet; and especially whenever my hypos get such an upper hand of me, that it requires a strong moral principle to prevent me from deliberately stepping into the street, and methodically knocking people's hats off – then, I account it high time to get to sea as soon as I can.
</p>
</div>
<span class="ellipsis" href="#showMore">
<a href="#showMore">…</a>
</span>
</div>
</body>
</html>