blob: 13f05bcae31e1895a54dff45a5609b61b416e863 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>A multi-line link</title>
</head>
<body>
<p>
This test page contains a link that spans two lines.
The center of the bounding box of the link is not inside the link element.
</p>
<p style="max-width: 15em">
<span id="filler"></span>
<a href="#top">a link</a>
</p>
<script>
var filler = document.getElementById('filler');
var link = document.getElementsByTagName('a')[0];
do {
filler.innerHTML += 'x';
} while (link.getClientRects().length < 2);
</script>
</body>
</html>
|