| 1 |
--- |
| 2 |
id: Background image |
| 3 |
section: components |
| 4 |
cssPrefix: pf-v6-c-background-image |
| 5 |
---## Examples |
| 6 |
|
| 7 |
### Basic |
| 8 |
|
| 9 |
```html isFullscreen |
| 10 |
<div |
| 11 |
class="pf-v6-c-background-image" |
| 12 |
style="--pf-v6-c-background-image--BackgroundImage: url(/assets/images/pf-background.svg)" |
| 13 |
></div> |
| 14 |
|
| 15 |
``` |
| 16 |
|
| 17 |
## Documentation |
| 18 |
|
| 19 |
### Overview |
| 20 |
|
| 21 |
In order to set the background image to be used, set the `--pf-v6-c-background-image--BackgroundImage` CSS variable to the path of the image. For example: `--pf-v6-c-background-image--BackgroundImage: url(custom/path/image.jpg);` |
| 22 |
|
| 23 |
### Usage |
| 24 |
|
| 25 |
| Class | Applied to | Outcome | |
| 26 |
| -- | -- | -- | |
| 27 |
| `.pf-v6-c-background-image` | `*` | A fixed background image is applied to the background of the page. | |
| 28 |
| `--pf-v6-c-background-image--BackgroundImage` | `.pf-v6-c-background-image` | Sets the background image to be used. **Required** | |