I use an owl carousel, and by default I have a nice colored background. but instead of a colored background, I want to use different images for each slide. I inserted the image as I inserted the text, but the image is too large, everything is destroyed. Could you help me with this? Here is the carousel code
<div class="wrapper-with-margin">
<div id="owl-demo" class="owl-carousel">
{% for import in mustSee %}
<div class="owl" style="white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis; font-size:12px;">{{import.title}}
<img src="{{import.get_image_url}}" /></div>
{% endfor %}
</div>
</div>
The text is displayed, but the problem is the image, the image should be the background of the div tag. But the fact is that I use a loop to display different images for each slide, I can not directly change the background, as in css. And in css,
#owl-demo .owl-item > div{
background : #42bdc2;
text-align: center;
padding:50px 0px;
margin:3px;
color: white;
font-size:32px;
border:1px white;
}
Instead
background :
, <img src="{{import.get_image_url}}" />, , for loop, . ?