レッスンに戻る

メモを内部に配置する(絶対)

importance: 5

以前のタスクを拡張する要素の近くにメモを表示する(絶対): elemanchor内に挿入するpositionAt(anchor, position, elem)関数を教えてください。

positionの新しい値

  • top-outright-outbottom-out - 以前と同じように動作し、elemanchorの上に/右に/下に挿入します。
  • top-inright-inbottom-in - elemanchor内に挿入します: 上端/右端/下端に配置します。

例えば

// shows the note above blockquote
positionAt(blockquote, "top-out", note);

// shows the note inside blockquote, at the top
positionAt(blockquote, "top-in", note);

結果

ソースコードとして、タスク要素の近くにメモを表示する(絶対)の解決策を採用してください。