简体   繁体   中英

Inline css background image not working

this is code i am using

<div class="item active" style="background-image: url('https://this is url/urlwebsite.com/images/sliderbg1.jpg');">

在此处输入图片说明

help me where is the problem

That image should appear .Here is the example

<div style="background-image:url(http://webneel.com/wallpaper/sites/default/files/images/01-2014/7-flower-wallpaper.jpg)">

Fiddle - https://jsfiddle.net/gLbn4dLm/

Edit: You have not specified Height of that DIV element. Please specify height of that DIV element.

Try with base_url()

<div class="item active" style="background-image: url('<?php echo base_url() ;?>images/sliderbg1.jpg');">

Make sure your images folder is in root(Out side application Folder) of project.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM