blob: 6d1e9ed248aff08c2e3ea11c087f9fde7b912707 (
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
|
<!doctype html>
<meta charset="utf-8">
<title>CSS values: max() between pixel and percentage values</title>
<link rel="help" href="https://drafts.csswg.org/css-values-4/#comp-func">
<link rel="match" href="reference/200-200-green.html">
<link rel="author" title="Xiaocheng Hu" href="mailto:xiaochengh@chromium.org">
<style>
html, body { margin: 0px; padding: 0px; }
#parent { width: 400px; }
#target {
width: max(100px, 25% + 100px, 150px + 10%);
height: 200px;
background: green;
}
#fail {
width: 200px;
height: 200px;
position: absolute;
z-index: -1;
background: red;
}
</style>
<div id=parent>
<div id=fail></div>
<div id=target></div>
</div>
|