<%@ 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. CSS:在子背景圖像上顯示父級背景圖像
- 5. 表格的背景圖像
- 6. 在asp.net中設置背景圖像(母版頁)
- 7. 背景中的一個像素顯示在IE7中的表格
- 8. 母版頁圖像不在子頁面上顯示
- 9. 在iPhone上不顯示背景圖像
- 10. 在iOS上不顯示背景圖像
- 11. 在UIWebView上顯示背景圖像
- 12. 在圖像背景上顯示文字
- 13. 背景圖像未全屏顯示
- 14. GWT TableCellElement未顯示背景圖像
- 15. Flex中列表爲空時顯示的背景圖像
- 16. 在模糊的背景圖像上顯示圖像
- 17. 背景圖像不顯示在Heroku的
- 18. 母版頁和視圖中的表格
- 19. 在頁面上顯示上傳的圖像作爲網格或圖像列表
- 20. 不顯示網頁背景圖像
- 21. 圖像未顯示爲Android中的我的背景
- 22. 背景圖片未顯示
- 23. 未顯示背景圖片
- 24. 爲在子目錄中使用的母版頁設置背景圖像
- 25. Safari 7未在Colorbox按鈕上顯示背景圖像
- 26. IE7父母與子女背景圖像的顯示問題
- 27. 背景圖片上的背景圖像
- 28. 在Firefox中不顯示背景圖像
- 29. 在jumbotron中不顯示背景圖像
- 30. 展望未在表格行內顯示背景圖片
我添加背景圖片,但在它的代碼是不是在這個帖子中顯示不知道爲什麼? – Learner 2011-02-12 14:07:34