Textdekoration funktioniert nicht für besuchten Staatslink
Ich bin neu auf CSS und versuchen zu verstehen, wie Links aufgrund des geänderten Status geändert werden. In meinem Szenario möchte ich das @ ändetext-decoration
zumline-through
wenn der Link eingeschaltet isthat besuch Zustand. Weder auf Mozilla NochChro Browser,text-decoration
des nicht mit @ aktualisierten Textinhalline-through
wenn der Link eingeschaltet isthat besuch state, wie unten gezeigt. Was habe ich falsch gemacht
Bitte benachrichtigen Sie, dass die Farbe aktualisiert wird (in Grün), wenn sich der Verbindungsstatus in @ änderhat besuch währendtext-decoration
bleibt gleich (siehe Demo # 1);
Hinweis: Es gibt einen Fehlerbericht für Mozilla zu demselben Problem: Mozilla Bug # 645786 und auf den Fehlerbericht. Problem auch für das @ reproduziertag.class:state
Wähle (a.:visited) (sieheDemo # 2)
<!DOCTYPE html>
<html>
<head>
<style>
a:link {
color: red;
text-decoration: none;
}
a:visited {
color: green;
text-decoration: line-through;
}
a:hover {
color: blue;
}
a:active {
color: yellow;
}
</style>
</head>
<body>
<p>
<b>
<a href="http://google.com" target="_blank">This is a link</a>
</b>
</p>
</body>
</html>
Demo # 2 - Selector With Class<!DOCTYPE html>
<html>
<head>
<style>
a.linkClass:link {
color: red;
text-decoration: none;
}
a.linkClass:visited {
color: green;
text-decoration: line-through;
}
a.linkClass:hover {
color: blue;
}
a.linkClass:active {
color: yellow;
}
</style>
</head>
<body>
<p>
<b>
<a class="linkClass" href="http://google.com" target="_blank">This is a link</a>
</b>
</p>
</body>
</html>