<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<style type="text/css">
.style1
{
width: 50px;
height: 323px;
}
.style2
{
width: 650px;
height: 323px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<table>
<tr>
<td style="width:30px; height:20px;">
<img src="Image/Blue%20hills.jpg"
style="height: 83px; width: 734px;" />
</td>
</tr>
<tr>
<td>
<table>
<tr>
<td style="background-color:Black; background-image:url('~/Images/Bluehills.jpg');" class="style1">
</td>
<td class="style2">
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
reserved © softech infoways
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
0
A
回答
0
尝试这样的:
<td style="background-color:Black; background-image:url('<%= ResolveUrl("~/Images/Bluehills.jpg") %>');" class="style1">
</td>
,并确保该/Images/Bluehills.jpg
图像确实存在(我看到在您的<img>
标签您使用的是不同的形象的名字,一个在其名称中的空格和位于在Image
文件夹中而不是Images
)。
另外,还要确保你定义的<td>
或图像的一些高度和宽度可能不会显示:
<td style="background-color:Black; width: 100px; height: 100px; background:url('<%= ResolveUrl("~/Images/Bluehills.jpg") %>') no-repeat;" class="style1">
</td>
我也强烈建议您使用FireBug检查装载什么样的图像和那些没有加载看到原因。它是一款出色的工具,也是每个Web开发人员必备的工具。
+0
@jagdeep,FireBug对此有何评论?什么原因? – 2011-02-12 14:18:47
0
发现一个奇怪的,但得到了图像显示
这里是解决方案,我用它没有波浪符号和它的工作不知道为什么请,如果你知道帮我了解
小行代码是
<td style="background-image:url(Image/Bluehills.jpg);" class="style1">
oiyhoyhobhobjho
jgkifjklhjljh
hghdoyjofjohjypt
dhgijrlyjhoftjpohktpu
</td>
通过使用这种图像显示GET
相关问题
- 1. 背景图像不显示,除非在母版页中声明
- 2. 点击母版页中突出显示div的背景
- 3. CSS:在子背景图像上显示父级背景图像
- 4. 背景中的一个像素显示在IE7中的表格
- 5. 母版页图像不在子页面上显示
- 6. 在iPhone上不显示背景图像
- 7. 在UIWebView上显示背景图像
- 8. 背景图像未全屏显示
- 9. Flex中列表为空时显示的背景图像
- 10. 在模糊的背景图像上显示图像
- 11. 不显示网页背景图像
- 12. 母版页和视图中的表格
- 13. 背景图片未显示
- 14. IE7父母与子女背景图像的显示问题
- 15. 背景图片上的背景图像
- 16. 在jumbotron中不显示背景图像
- 17. 在Firefox中不显示背景图像
- 18. 背景图像显示
- 19. 不显示背景图像
- 20. 不显示背景图像
- 21. 背景图像dosnt显示
- 22. Matlab - 显示背景图像
- 23. 背景图像不显示
- 24. 不显示背景图像
- 25. 我的CSS背景图片未显示
- 26. bootstrap - 如何仅在主页上显示背景图像?
- 27. 在ScrollBarViewer的RepeatButton中使用背景图像不显示图像
- 28. ImageView的背景不显示图像
- 29. 显示图像的背景颜色 - CSS
- 30. 如何显示的图像为背景
我添加背景图片,但在它的代码是不是在这个帖子中显示不知道为什么? – Learner 2011-02-12 14:07:34