从CSS URL加载图像时出现问题 [英] problem loading image from css URL

查看:81
本文介绍了从CSS URL加载图像时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


将横幅图片加载到.aspx页时遇到问题.
这是我在项目中为CSS和图像创建一个单独的文件夹的问题
像这样../CSS/Director/Director.css,图像存储在../Image/Director/Image



Hello every one,


I am facing problem in loading my banner image into my .aspx page.
Here is the problem i have create a separate folder in my project for CSS and Images
its like this ../CSS/Director/Director.css and image is stored in ../Image/Director/Image



.bg_header{ background-image:url(../Image/Director/Image/images/bg_header.jpg); background-position:center; background-repeat:no-repeat;} 



此代码在CSS文件中
但我没有得到图像
如果我这样写



this code in CSS file
but i am not getting image
if i write like this

.bg_header{ background-image:url(E:/Project1/Image/Director/Image/images/bg_header.jpg); background-position:center; background-repeat:no-repeat;} 



然后图像将显示.

这里的问题是图像src没有获得正确的路径,所以任何人都可以告诉我如何给



then the image is going to display .

Here the problem is image src is not getting the proper path so can any body tell me how can i give the

<pre lang="CSS"><img src="......"/>




在此先感谢...




thanks in advance...

推荐答案

hii

如果您尝试
这个../../../../../Image/Director/Image/images/bg_header.jpg是因为..返回上一步或返回一个文件夹
hii

if your try
this ../../../../../Image/Director/Image/images/bg_header.jpg because .. return one step back or one folder back


这篇关于从CSS URL加载图像时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆