summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-overflow/overflow-clip-margin-011.html
blob: 5952f5e9ded1f463bc72062d9c9fa0833b165200 (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
<!doctype html>
<meta charset="utf-8">
<title>Overflow-clip-margin: child of a small-border-box out-of-view large-clip-margin parent is shown</title>
<link rel="help" href="https://www.w3.org/TR/css-overflow-3/#propdef-overflow-clip-margin">
<link rel="author" title="Xianzhu Wang" href="mailto:wangxianzhu@chromium.org">
<link rel="match" href="overflow-clip-margin-011-ref.html">
<style>
  .overflow-hidden {
    width: 200px;
    height: 200px;
    overflow: hidden;
  }
  .parent {
    width: 100px;
    height: 100px;
    position: relative;
    top: 500px;
    overflow: clip;
    overflow-clip-margin: 500px;
    z-index: 1;
    background: red;
  }
  .child {
    width: 100px;
    height: 100px;
    position: relative;
    top: -500px;
    background: green;
  }
</style>
<div class="overflow-hidden">
  <div class="parent">
    <div class="child">
  </div>
</div>