Skip to content

Commit f6bcb59

Browse files
authored
docs: layout image: add backgroundSize doc (#164)
1 parent 79a4d45 commit f6bcb59

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

builtin/layouts.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,25 @@ image: ./path/to/the/image
7979
---
8080
```
8181

82+
You can change the default background size (`cover`) by adding the `backgroundSize` attribute:
83+
84+
```yaml
85+
---
86+
layout: image
87+
image: ./path/to/the/image
88+
backgroundSize: contain
89+
---
90+
```
91+
92+
```yaml
93+
---
94+
layout: image-left
95+
image: ./path/to/the/image
96+
backgroundSize: 20em 70%
97+
---
98+
```
99+
100+
82101
### `iframe-left`
83102

84103
Shows a web page on the left side of the screen, the content will be placed on the right side.

0 commit comments

Comments
 (0)