Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot set background image #248

Open
haniframadhani opened this issue Jan 10, 2025 · 0 comments
Open

cannot set background image #248

haniframadhani opened this issue Jan 10, 2025 · 0 comments

Comments

@haniframadhani
Copy link

i want to set image as backround image. i do like this
using arbitrary value

<div class="bg-[url('<?= bloginfo('template_directory') ?>/assets/images/heroimage.webp')]"></div>

and custom in tailwind.config.js

module.exports = {
  theme: {
    extend: {
      backgroundImage: {
        'hero-image': "url('/assets/images/heroimage.webp')",
      }
    }
  }
}
<div class="bg-hero-image"></div>

the cannot be found if not use <?= bloginfo('template_directory') ?>/assets/images/heroimage.webp. if use <?= bloginfo('template_directory') ?>/assets/images/heroimage.webp it build successfuly but the class not found in build css and the image not showing in web
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant