0%

使用<details>标签在网页里面添加脚注

使用 details 标签可以为文章添加相应注解
代码:

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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
details, summary {
display: inline;
vertical-align: super;
font-size: 0.75em;
}
summary {
cursor: pointer;
}
details[open] {
display: contents;
}
details[open]::before {
content: " [";
}
details[open]::after {
content: "]";
}
</style>
</head>
<body>
The most cited work in history, for example, is a 1951 paper
<details>
<summary>1</summary>
Lowry, O. H., Rosebrough, N. J., Farr, A. L. & Randall, R. J. J. Biol. Chem. 193, 265–275 (1951).
</details>
describing an assay to determine the amount of protein in a solution.
</body>
</html>

效果如下:
rRBzkt.gif

------ 本文结束------