I'm having trouble loading the image Hormiga.jpg as a background for my slideshow using inline style. The url attribute doesn't seem to be applied correctly.
Here is the original code where an image is loaded successfully:
<div class="parallax-bg" style="background-image:url(./images/nature-1.jpg)" data-swiper-
parallax="-23%"></div>
The above code is not mine. I have the following file paths:
- myapp/templates/myapp/index.html
- myapp/static/images/Hormiga.jpg
In index.html, the images are called correctly like this, but the css inline style is not working:
"{% static 'images/Hormiga.jpg' %}"
The following attempts are not successful:
style="background-image:url"({% static 'images/Hormiga.jpg' %})""
style="background-image:url("{% static 'images/Hormiga.jpg' %}")"
style="background-image:url"(../images/Hormiga.jpg)""
style="background-image:url(images/Hormiga.jpg)"
style="background-image:url(../myapp/static/images/Hormiga.jpg)"
Any assistance would be greatly appreciated. The root is static/images/Hormiga.jpg
Thank you