how to load images of css file in codeigniter [closed]

♀尐吖头ヾ 提交于 2020-01-26 04:19:06

问题


i have problem to load images in coedigniter, with the help of base_url(), i succeed to load css but unfortunately images not. Actualy images are called in css file(style.css), so to load style.css i changed in html like this:

<link href="<?php echo base_url('css/style.css'); ?>" rel="stylesheet" type="text/css" media="screen" />

okay it is loading all style and css but the image are not loading which is used in styl.css preview of css:

html, body { height: 100%; }

* {
    margin: 0;
    padding: 0;
}

body {
    background: url(images/img04.jpg) repeat left top;
}

so any idea any suggestion will be highly appreciate. thank you


回答1:


Try like this

body {
    background:url('../images/img04.jpg') repeat left top;
}


来源:https://stackoverflow.com/questions/16749614/how-to-load-images-of-css-file-in-codeigniter

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!