Highlight current anchor with css instead of js.

The `:target` selector is supported by all browsers.
This commit is contained in:
Maximilian Krög
2020-02-09 16:07:14 +01:00
parent 05d3386995
commit f5a996a64e
2 changed files with 2 additions and 19 deletions

View File

@@ -51,7 +51,8 @@ body {
width: 0px;
height: 0px;
}
.nameContainer .anchor.highlighted + h4 {
/* Highlighting current anchor */
.nameContainer .anchor:target + h4 {
background-color: #faebcc;
}
a {