回答編集履歴
3
追記
test
CHANGED
@@ -55,3 +55,81 @@
|
|
55
55
|
</html>
|
56
56
|
|
57
57
|
```
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
追記
|
62
|
+
|
63
|
+
---
|
64
|
+
|
65
|
+
```HTML
|
66
|
+
|
67
|
+
<!DOCTYPE HTML>
|
68
|
+
|
69
|
+
<html>
|
70
|
+
|
71
|
+
<head>
|
72
|
+
|
73
|
+
<meta charset="UTF-8">
|
74
|
+
|
75
|
+
<title>タイトル</title>
|
76
|
+
|
77
|
+
<style type="text/css">
|
78
|
+
|
79
|
+
* {
|
80
|
+
|
81
|
+
margin: 0;
|
82
|
+
|
83
|
+
padding: 0;
|
84
|
+
|
85
|
+
}
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
.text1 a[title]:hover::after {
|
90
|
+
|
91
|
+
display: block;
|
92
|
+
|
93
|
+
position: absolute;
|
94
|
+
|
95
|
+
top: 1.0em;
|
96
|
+
|
97
|
+
left: 1.0em;
|
98
|
+
|
99
|
+
width: 12em;
|
100
|
+
|
101
|
+
border: #000 solid 1px;
|
102
|
+
|
103
|
+
background: #fff;
|
104
|
+
|
105
|
+
color: #000;
|
106
|
+
|
107
|
+
content: attr(title);
|
108
|
+
|
109
|
+
z-index: 2;
|
110
|
+
|
111
|
+
}
|
112
|
+
|
113
|
+
</style>
|
114
|
+
|
115
|
+
</head>
|
116
|
+
|
117
|
+
<body>
|
118
|
+
|
119
|
+
<div class="text1">
|
120
|
+
|
121
|
+
<a title="テキスト1">テキスト1</a>
|
122
|
+
|
123
|
+
</div>
|
124
|
+
|
125
|
+
<div class="text2">
|
126
|
+
|
127
|
+
<a title="テキスト2">テキスト2</a>
|
128
|
+
|
129
|
+
</div>
|
130
|
+
|
131
|
+
</body>
|
132
|
+
|
133
|
+
</html>
|
134
|
+
|
135
|
+
```
|
2
修正
test
CHANGED
@@ -26,7 +26,7 @@
|
|
26
26
|
|
27
27
|
|
28
28
|
|
29
|
-
a[title="テキスト1"]:hover {
|
29
|
+
.text1 a[title="テキスト1"]:hover {
|
30
30
|
|
31
31
|
color: #ffff00;
|
32
32
|
|
1
追記
test
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
質問者さんのコードでは、テキストをホバーさせていない時にもテキストが表示されるのですが...
|
1
|
+
どのテキストかわかりませんが、質問者さんのコードでは、テキストをホバーさせていない時にもテキストが表示されるのですが...
|
2
2
|
|
3
3
|
CSSでclassがtext1のtitle="テキスト1"の文字のところにスタイルを適応させたい時、というのは以下のような挙動でしょうか?
|
4
4
|
|