Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-transforms/transform-descendant-001.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<head>
<title>CSS Test (Transforms): Transform Affects Descendant</title>
<link rel="author" title="Clint Talbert" href="mailto:ctalbert@mozilla.com">
<link rel="author" title="Aryeh Gregor" href="mailto:ayg@aryeh.name">
<meta name="assert" content='This just tests that a transform on a
container div moves its contents, not just the div itself.'>
<link rel="match" href="transform-descendant-ref.html">
<style>
body > div {
background: green;
width: 100px;
height: 100px;
}
span {
background: yellow;
}
body > div > div {
transform: translate(20px, 150px);
}
</style>
</head>
<body>
<div>
<div><span>span 1</span></div>
</div>
<span>span 2</span>
</body>
</html>