代码示例:(标识:cssref_justify-items_writing-mode)
<!DOCTYPE html>
<html>
<head>
<style> 
#container {
  width: 50%;
  aspect-ratio: 2/1;
  border: 1px solid black;
  display: grid;
  grid-template-columns: 1fr 1fr;
  justify-items: end;
  writing-mode: vertical-rl;
}

#container > div {
  border: 1px solid black;
}

.blue {
  background-color: lightblue;
  inline-size: 60%;
}

.red {
  background-color: coral;
  inline-size: 50%;
}

.green {
  background-color: lightgreen;
  inline-size: 70%;
}
</style>
</head>
<body>

<h1>设置 justify-items 以及 writing-mode: vertical-rl</h1>

<p>网格项目沿行内方向在网格容器的末端对齐。使用 writing-mode 属性,行内方向从水平方向移动到向下方向,所以现在行内方向上的容器末端位于容器的底部而不是右侧。</p>

<div id="container">
  <div class="red">红色</div>
  <div class="blue">蓝色</div>
  <div class="green">绿色</div>
  <div class="red">红色</div>
</div>

</body>
</html>
运行结果: