设置图片位置:center、top、bottom、left、right。
cover、contain 或具体尺寸。
控制重复行为。
设置图片位置:center、top、bottom、left、right。
cover、contain 或具体尺寸。
控制重复行为。
设置图片位置:center、top、bottom、left、right。
cover、contain 或具体尺寸。
控制重复行为。
设置图片位置:center、top、bottom、left、right。
cover、contain 或具体尺寸。
控制重复行为。
设置图片位置:center、top、bottom、left、right。
cover、contain 或具体尺寸。
控制重复行为。
设置图片位置:center、top、bottom、left、right。
cover、contain 或具体尺寸。
控制重复行为。
设置图片位置:center、top、bottom、left、right。
cover、contain 或具体尺寸。
控制重复行为。
设置图片位置:center、top、bottom、left、right。
cover、contain 或具体尺寸。
控制重复行为。
主要关注点:控制背景图片的定位和缩放。
---
layout: home
hero:
background:
type: image
image:
src: /images/hero-bg.jpg
position: center
size: cover
repeat: no-repeat
---| 键 | 值 | 说明 |
|---|---|---|
hero.background.image.position | center, top, bottom, left, right | 图片位置 |
hero.background.image.size | cover, contain, auto, 或具体尺寸 | 图片尺寸 |
hero.background.image.repeat | repeat, no-repeat, repeat-x, repeat-y | 重复方式 |