Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Title of the document</title> <style> #element1 { position: relative; width: 300px; height: 300px; border: 2px solid #666; } #element2 { width: 100px; height: 100px; background-color: #1c87c9; position: absolute; top: 90px; left: 100px; offset-position: auto; offset-anchor: center; offset-path: ray(45deg); } </style> <body> <h2>Offset-position property example</h2> <div id="element1"> <div id="element2"></div> </div> </body> </html>