Theo's Typesafe CultTTC
Theo's Typesafe Cult3y ago
28 replies
Perchant

Add custom background from file with tailwind

I would like to add custom background to website via local file and I used this
<div class="bg-[url('/your/image.svg')]"> <!-- ... --> </div>
Doesnt work
Then I tried add the image to /src/image or just /src and it didnt work
visited these 2 posts and nothing worked
https://github.com/tailwindlabs/tailwindcss/discussions/3113
https://github.com/tailwindlabs/tailwindcss/discussions/8877
Any suggestions?
GitHub
I wrote the following file using this as the reference about customizing backgroud image. module.exports = { purge: [&quot;./src/*/.tsx&quot;], darkMode: false, // or &#39;media&#...
I can't set a backgorund image in tailwind.config.js because of fai...
Was this page helpful?