blob: 2c77838108d535372866ca5aafc6115c6dbea144 (
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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
<!DOCTYPE html>
<meta charset="UTF-8">
<title>CSS Background and Borders Test: box-shadow and overlapping of adjacent text</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
<link rel="help" href="https://www.w3.org/TR/css-backgrounds-3/#shadow-layers" >
<link rel="match" href="reference/box-shadow-overlapping-001-ref.html">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css">
<meta content="Box shadows do not affect layout. Box shadows take up no space. Box shadows do not affect or influence normal flow of boxes. Therefore, box shadows can 'collide' with other boxes and can overlap other boxes (inline box or line box) or be overlapped by other boxes. In this test, the text ('PED') is before a left outer box-shadow box and such left outer box-shadow box is wide and wide enough to overlap the text 'PED'." name="assert">
<style>
div
{
color: red;
float: left;
font-family: Ahem;
font-size: 100px;
line-height: 1;
}
span
{
color: green;
box-shadow: -3em 0em;
}
/*
omitted colors default to the value of the color property.
1st <length>
Specifies the horizontal offset of the shadow. A positive value
draws a shadow that is offset to the right of the box, a negative
length to the left.
2nd <length>
Specifies the vertical offset of the shadow. A positive value
offsets the shadow down, a negative one up.
*/
</style>
<p>Test passes if there is a filled green rectangle and <strong>no red</strong>.
<div>PED<span>PNG</span></div>
|