运行 ❯
获取您的
自己的
网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <head> <style> #container { block-size: 100%; aspect-ratio: 1; border: solid black 1px; display: grid; grid-template-columns: 1fr 1fr; writing-mode: vertical-rl; } #container > div { inline-size: 40%; aspect-ratio: 1; margin: 2px; background-color: coral; } #myDiv { border: solid black 3px; place-self: end; } </style> </head> <body> <h1>The place-self Property</h1> <p>The writing-mode property value 'vertical-rl' affects the placement of the grid item placed with place-self property value 'end'. End in block direction is now to the left, and end in inline direction is now at the bottom.</p> <div id="container"> <div>Normal div</div> <div id="myDiv">myDiv</div> <div>Normal div</div> <div>Normal div</div> </div> </body> </html>