Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Motion Path test: ray() closest-side with content-box and offset-position: normal</title>
<link rel="match" href="offset-path-ray-coord-box-offset-position-normal-002-ref.html">
<meta name="assert" content="With offset-position: normal, ray() sizes are measured from the center of its coord-box.">
<style>
#outer {
position: relative;
width: 300px;
height: 200px;
padding-left: 200px;
}
#red {
position: absolute;
left: 400px;
top: 50px;
width: 100px;
height: 100px;
background: red;
}
#target {
position: absolute;
left: 0;
top: 0;
width: 100px;
height: 100px;
background: green;
offset-path: ray(90deg closest-side) content-box;
offset-distance: 100%;
offset-rotate: 0deg;
}
</style>
<p>Test passes if there is a filled green square and no red.</p>
<div id="outer">
<div id="red"></div>
<div id="target"></div>
</div>