阅读(2279)

HTML figure

最后一次修改 2017年08月03日

HTML figure

figure 和 figcaption 创建数字

HTML5数字是内容,可选地带有标题,自包含,通常被称为单个单元。

使用 figure 元素定义数字。

figure元素可以可选地包含figcaption元素,其表示图形的标题。

例子

你可以在下面的代码中看到一起使用的 figure figcaption 元素。

<!DOCTYPE HTML><html><body>
  I like XML and CSS.
  <figure>
    <figcaption>Listing 01. Using the code element</figcaption>
    <code>
      var fruits = ["CSS", "HTML", "CSS", "Javascript"];<br>
      document.writeln("I like " + fruits.length + " fruits");    </code>
  </figure></body></html>

上面的代码渲染如下:





HTML figure

figure 和 figcaption 创建数字

HTML5数字是内容,可选地带有标题,自包含,通常被称为单个单元。

使用 figure 元素定义数字。

figure元素可以可选地包含figcaption元素,其表示图形的标题。

例子

你可以在下面的代码中看到一起使用的 figure figcaption 元素。

<!DOCTYPE HTML><html><body>
  I like XML and CSS.
  <figure>
    <figcaption>Listing 01. Using the code element</figcaption>
    <code>
      var fruits = ["CSS", "HTML", "CSS", "Javascript"];<br>
      document.writeln("I like " + fruits.length + " fruits");    </code>
  </figure></body></html>

上面的代码渲染如下: