Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-page/layers-004-print.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<link rel="match" href="layers-004-print-ref.html"/>
<style>
@layer layer2, layer1;
@page b{
margin: 3cm;
}
@layer layer1 {
@page b {
margin: 1cm;
}
@page :first {
margin: 0cm;
}
}
@layer layer2 {
@page b {
margin: 0;
}
@page a:first {
margin: 2cm;
}
}
div {
width: 1cm;
height: 1cm;
border: 2px solid red;
}
</style>
<body>
<div style="page: a; border-color: lightblue"></div>
<div style="page: b; border-color: pink"></div>
</body>
</html>