May 2022
Intermediate to advanced
104 pages
2h 24m
English
CSS has a lot of properties for displaying a background image, and Tailwind provides utilities for almost all of them.
If you want a background image that comes from a URL, Tailwind provides utilities for how that image is displayed but not for the URL itself. You have three options for specifying the background image URL: you can use the style= attribute of the DOM element, as in <div style="background-image: url(whatever)"> </div>, or you can use the arbitrary syntax and surround it in square brackets, as in class="[background-image:url({url})]". Finally, you can create your own CSS utility classes:
| | .bg-pattern-image { |
| | background-image: url(whatever); |
| | } |
When you have a background image, you ...
Read now
Unlock full access