ruby on rails - inject url into background-image -


@media #{$only-small} {      .beverages--element .inner:before{         background-image: url(....);         background-repeat: no-repeat;     } } 

i have piece of code, used style box show beverage in list of beverages.

so far good, until i've used same image beverages. need extend logic, each beverage has different image. image stored in cloud service , have it's link in database beverages stored. how can pass link view css?

thanks

one option have set background image inline, in html. so:

<div style="background-image:(...)">mydiv</div> 

Comments

Popular posts from this blog

python - Redis Error 8 connecting localhost:6379. nodename nor servname provided, or not known -

python - matpltolib navigation toolbar edit curves and parameters line color automatically changes issue -