DMXzone App Connect Support Product Page
Answered
How can we add dynamic backgrounds and videos to divs
Asked 06 Dec 2017 21:49:55
1
has this question
06 Dec 2017 21:49:55 Miguel Quintero posted:
I got a div that I load from the database with a background picture or videos, how can this be accomplish with this tool example<div class="hero" style="background-image: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)),url({{BgImg}});" >
---- Bunch of content ------
</div>
Replies
Replied 07 Dec 2017 08:17:29
07 Dec 2017 08:17:29 Teodor Kuduschiev replied:
Hello Miguel,
Please use the Dynamic Attributes > Style in App connect and define your styles there.
Please use the Dynamic Attributes > Style in App connect and define your styles there.
Replied 07 Dec 2017 13:42:19
07 Dec 2017 13:42:19 Miguel Quintero replied:
I used the dynamic attribute so in dreamweaver it is: <div class="hero" dmx-style:mos="background-image: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)),url({{BgPicture}})" >
But on the site when tested it looks like this:
<div class="hero">
Content in the div
</div>
So seems to not be working unless im doing something wrong
But on the site when tested it looks like this:
<div class="hero">
Content in the div
</div>
So seems to not be working unless im doing something wrong
Replied 07 Dec 2017 14:16:00
07 Dec 2017 14:16:00 Teodor Kuduschiev replied:
This expression is wrong. What is: dmx-style:mos ?
It must be dmx-style:background-image:
As your expression is pretty complex, here is how it should look like:
It must be dmx-style:background-image:
As your expression is pretty complex, here is how it should look like:
dmx-style:background-image="'linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)),url('+ BgPicture +')'"
Replied 07 Dec 2017 14:45:40
07 Dec 2017 14:45:40 Miguel Quintero replied:
Thank you that worked