# Create charts through CSS

https://github.com/ChartsCSS/charts.css

```html
<link rel="stylesheet" href="https://unpkg.com/charts.css/dist/charts.min.css">

<table class="charts-css bar ">

  <caption> 2016 Summer Olympics Medal Table </caption>

  <thead>
    <tr>
      <th scope="col"> Country </th>
      <th scope="col"> Gold </th>
      <th scope="col"> Silver </th>
      <th scope="col"> Bronze </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <th scope="row"> USA </th>
      <td style="--size: 0.46"> 46 </td>
      <td style="--size: 0.37"> 37 </td>
      <td style="--size: 0.38"> 38 </td>
    </tr>
    <tr>
      <th scope="row"> GBR </th>
      <td style="--size: 0.27"> 27 </td>
      <td style="--size: 0.23"> 23 </td>
      <td style="--size: 0.17"> 17 </td>
    </tr>
    <tr>
      <th scope="row"> CHN </th>
      <td style="--size: 0.26"> 26 </td>
      <td style="--size: 0.18"> 18 </td>
      <td style="--size: 0.26"> 26 </td>
    </tr>
  </tbody>

</table>
```


相关：[[use-typescript|use-typescript]]
