示例工程 42-logical-properties

42-logical-properties/demo-02-inset/index.html

html · 0.6 KB

运行:逻辑定位

点击「运行示例」后,左侧显示源码、右侧显示运行结果;console 输出会实时回传。

<!doctype html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>逻辑定位</title>
    <link rel="stylesheet" href="style.css" />
  </head>
  <body>
    <h1>逻辑定位</h1>

    <div class="frame" dir="ltr">
      <span class="badge">LTR</span>
      <span class="dot" aria-hidden="true"></span>
      <p>inset-inline-end 在右侧。</p>
    </div>

    <div class="frame" dir="rtl">
      <span class="badge">RTL</span>
      <span class="dot" aria-hidden="true"></span>
      <p>inset-inline-end 换到左侧。</p>
    </div>
  </body>
</html>