Background image dynamically

0

I have a list of products by clicking on some of them, redirects to another page showing just the content of that item. I get the Image, but I would like it to be as a background, ie: it will show the same image in full size, and with text and etc. written above. Is there a way to do this? Because to receive it I am using <img src="{{produto.nom_pathimagem}}" class="bgimage" > . So I can not set a default value in scss. Thanks to any help: D

    
asked by anonymous 28.08.2018 / 19:52

1 answer

-1

Declare in style. Example:

<div style="background-image:url('{{ produto.nom_pathimagem }}')"></div>

;)

    
28.08.2018 / 20:04