I would like to set a background-image to my HTML page rendered with Jade. Does anyone know how to achieve this?
Thanks
You can set the style attribute like this:
div(style='background-image: url(/myImage.jpg);')
However, you should avoid using inline style. Separate your content from design - keep html and css in separate files.
Read more about attributes in jade here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With