offset-path-ray-contain-003.html (862B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>CSS Motion Path: ray paths with contain</title> 5 <link rel="help" href="https://drafts.fxtf.org/motion-1/#offset-path-property"> 6 <link rel="match" href="offset-path-ray-contain-003-ref.html"> 7 <meta name="assert" content="This tests that the element should be contained in ray() path circle."> 8 <style> 9 #container { 10 width: 300px; 11 height: 300px; 12 } 13 #target { 14 position: relative; 15 left: 150px; 16 top: 150px; 17 width: 100px; 18 height: 100px; 19 background-color: lime; 20 offset-path: ray(45deg closest-side contain); 21 offset-rotate: 0deg; 22 offset-distance: 100%; 23 offset-position: auto; 24 } 25 </style> 26 </head> 27 <body> 28 <div id="container"> 29 <div id="target"></div> 30 </div> 31 </body> 32 </html>