-
Notifications
You must be signed in to change notification settings - Fork 83
/
Copy path35_tooltip.html
54 lines (53 loc) · 1.74 KB
/
35_tooltip.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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
<style>
/* TOOL TIP */
p {
margin: 1em;
font-size: 30px;
font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
}
p [data-tooltip="true"] {
border-bottom: 1px solid;
text-decoration:none;
line-height:1;
display:inline;
z-index: 0;
}
p [data-tooltip="true"]:hover {
position: relative;
}
p [data-tooltip="true"]:hover:before {
content: attr(title);
position: absolute;
top: 45px;
left: 0;
background-color: #C7573A;
color: white;
max-width: 10em;
min-width: 5em;
font-style: normal;
padding: 5px;
border-radius: 10px;
text-align:center;
z-index: 100;
}
p [data-tooltip="true"]:hover:after {
content: "";
position:absolute;
bottom: -10px;
border: 15px solid;
position: absolute; left: 20px;
border-color: transparent transparent #C7573A ;
}
</style>
</head>
<body>
<p>In this section you have learned the general idea of using generated content to create effects and / or to provide additional information. Try hovering over me to find out how awesome <i title="Generated Content Rocks my world" data-tooltip="true">generated content</i> can be.</p>
<p>Open up a text editor and try creating a <i title="'Cause tool tips are awesome" data-tooltip="true">tooltip</i> without looking at the code. But, if you must, the code is attached, or you can check out your web inspector.</p>
<p style="margin-bottom: 50px;">Here is <a title="View source for solution" data-tooltip="true" href="files/35_tooltip.html" target="play">one solution</a></p>
</body>
</html>