The ratio shortcode is perfect for responsively handling video or slideshow embeds based on the width of the parent.
1{{< bs/ratio [size] >}}
2CONTENT HERE
3{{< /bs/ratio >}}
ratio
Position | Name | Type | Required | Default | Since |
---|---|---|---|---|---|
#0 | ratio | string | - | 16x9 | - |
The aspect ratio, 1x1
, 4x3
, 16x9
and 21x9
.
1{{< bs/ratio 1x1 >}}
2 {{< bilibili BV1iT411B7yH >}}
3{{< /bs/ratio >}}
1{{< bs/ratio 4x3 >}}
2 {{< bilibili BV1iT411B7yH >}}
3{{< /bs/ratio >}}
1{{< bs/ratio 16x9 >}}
2 {{< bilibili BV1iT411B7yH >}}
3{{< /bs/ratio >}}
1{{< bs/ratio 21x9 >}}
2 {{< bilibili BV1iT411B7yH >}}
3{{< /bs/ratio >}}