关于放置图像 [英] about putting images

查看:94
本文介绍了关于放置图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请问您能告诉我在asp.net编程中我的图像在哪里可以访问css表?

Would you please tell me where will i put my image to get access in css sheet in asp.net programming ?

推荐答案

您可以在用户内创建一个文件夹项目为'内容',然后在'内容'文件夹中创建另一个文件夹'图像'并将图像放在那里,从CSS访问这些图像如下。 br $> b $ b

You can create a folder inside user project as 'Content' and then create another folder inside the 'Content' folder as 'Image' and put your images there and access those images from CSS is as below.

#loadingDiv
   {
     background: url(/content/images/loading.gif) no-repeat;
   }


您可以将文件放在任何目录(或目录)中,只要它们都放在为您配置的根目录下现场。通常,Web应用程序在沙盒环境中的HTTP服务器下执行,因此它们无法访问此根目录之外的任何内容。



原因是,使用相对路径访问文件是最好的。例如,../../ images / myImage.png,images / backgrounds / cloudySky.png,./ images / backgrounds / cloudySky.png等。我希望你知道路径语法和语义。 :-)



-SA
You can put the files in any directory (or directories), as soon as they all are put under the root directory configured for your site. Usually, Web applications are executed under an HTTP server in a sandboxed environment, so they cannot access anything beyond this root directory.

By many reasons, it's the best to access the file using relative paths. For example, "../../images/myImage.png", "images/backgrounds/cloudySky.png", "./images/backgrounds/cloudySky.png", and so on. I hope you know path syntax and semantic. :-)

—SA


这篇关于关于放置图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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