Defines the size of the background image.
npm install @citizensadvice/background-sizeDefines the size of the background image.
- Classes
- Examples
- Installation
``CSS`
.bg-cover { background-size: cover }
.bg-contain { background-size: contain }
To apply specific classes at set screen widths, use the following classes:
| Class name | Description |
| --------------------- | ------------------------------------------- |
| [aboveClassName]-ns | Screens with a min-width of 48rem |[aboveClassName]-m
| | Screens with widths from 48rem to 64rem |[aboveClassName]-l
| | Screens with a min-width of 64rem |
`html`...
`shell`
$ npm install @citizensadvice/background-size
now import into your stylesheet...
`scss`
@import '@citizensadvice/background-size/index.scss';
You can also make use of the unpkg service, try adding the link below to the head of your HTML file
`html``