背景图像不显示 [英] Background image doesn't display

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

问题描述

大家好,



另一个使用Visual Studio 2005的新手问题,asp.net,c#。



我有一张小图片(pic1.jpg),我想用它来作为网页的背景(用该图像填充整个屏幕)。我创建了一个App_LocalResources资源文件夹,并在其中放置了pic1.jpg。在属性中,我将此图像设置为背景,并生成以下代码:



< body background =App_LocalResources / pic1.JPG>



在设计模式下,它可以运行,但是当我测试它时,图像无处可见。我尝试过不同的资源文件夹无济于事,所以这就是我现在坐的地方。谢谢。

Hello all,

Another newbie question using Visual Studio 2005, asp.net, c#.

I''ve got a smallish picture (pic1.jpg) that I want to use as a background for a web page (filling the entire screen with that image). I''ve created an App_LocalResources resource folder and placed pic1.jpg in it. In Properties, I set this image as the background and the following code is generated:

<body background="App_LocalResources/pic1.JPG">

In design mode, it works hunky-dory, but when I test it, the image is nowhere to be seen. I''ve tried different resource folders to no avail, so this is where I sit right now. Thanks.

推荐答案

试试这个

Try this
<body background="/App_LocalResources/pic1.JPG">



您也可以使用CSS参考以下文章

http://www.w3schools.com/css/css_background.asp [ ^ ]


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

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