在自定义服务器控件中的css文件中嵌入图像 [英] Embed image which is in css file in custom server control

查看:62
本文介绍了在自定义服务器控件中的css文件中嵌入图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友.
我正在研究自定义服务器控件.我需要将js,css和图像文件嵌入控件中.我已经添加了js和css文件,但是嵌入css文件中的图像时遇到了问题.我已经在css文件的一个类中设置了背景图片,但是当我运行页面时该图片不会显示.

那么是否可以为放置在css文件中的图像添加webresourceurl?



谢谢
Imrankhan

Hello friends.
I am working on custom server control. I need to embed js,css and image files in control. I have added js and css file but I am facing a problem to embed images which is in css file. I have set background image in one class in css file but that image does not display when I run the page.

So Is it possible to add webresourceurl for images which are placed in css file?



Thanks
Imrankhan

推荐答案

我认为其原因是错误的图像路径.如何在CSS中指定图片路径?
I think its because of the wrong image path. How you specified image path in CSS?


css文件中的图片.背景:url(bottom.gif)右下无重复;注意:图像放置在服务器控件中而不是Web应用程序中
image in css file. background: url(bottom.gif) no-repeat right bottom; note: images are placed in server control not in web application


这篇关于在自定义服务器控件中的css文件中嵌入图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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