1

html5 では、<figcaption>css を使用せずにタグを下部ではなく上部に配置するにはどうすればよいですか。ここにスニペットがあります、

<figure>
  <img src="img_pulpit.jpg" alt="The Pulpit Rock"
  width="304" height="228" />
  <figcaption>Fig1. - A view of the pulpit rock in Norway.</figcaption>
</figure>

のようなセマンティックな方法はあります<figcaption align='top'>か?

4

1 に答える 1

2

を( example<figcaption> )の最初の子として置くだけです:<figure>

<figure>
  <figcaption>Fig1. - A view of the pulpit rock in Norway.</figcaption>
  <img src="img_pulpit.jpg" alt="The Pulpit Rock" width="304" height="228" />
</figure>

<figcaption>要素を最後の子にしたいが、画像の上に表示する場合、これは表示上のものであり、 CSS で行う必要があります。


この要素を使用できるコンテキスト:
figure 要素の最初または最後の子として。

コンテンツ属性:
グローバル属性

ソース

于 2012-07-19T14:21:48.990 に答える