运行 ❯
获取您
自己的
网站
×
更改方向
保存代码
更改主题,深色/浅色
转到 Spaces
<!DOCTYPE html> <html> <head> <style> #container { width: 60%; aspect-ratio: 1; border: solid black 1px; display: grid; grid-template-columns: 1fr 1fr; place-items: end; writing-mode: vertical-rl; } #container > div { width: 40%; aspect-ratio: 1; margin: 2px; background-color: coral; } </style> </head> <body> <h1>The place-items Property with writing-mode 'vertical-rl'</h1> <p>The grid items are aligned to the end in the inline and block directions, but with the writing-mode property value set to 'vertical-rl' the end in block direction is now left instead of bottom, and the end in inline direction is now bottom instead of right.</p> <div id="container"> <div>direction</div> <div>direction</div> <div>direction</div> <div>direction</div> </div> </body> </html>