没有在网站上显示的背景图像 [英] background image not showing on website

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

问题描述

大家好,



我通过链接网站母版页的visual studio中的属性在我的网站上使用了背景图片。以下是代码。问题是即使在用于编码的同一台计算机上,图像也不会在发布时显示。请建议..

谢谢

Atul



Hi All,

I have used a background image on my website through linking in properties in visual studio of the master page of website. Following is the code. The issue is that the image does not show on publishing, even on the same computer used for coding. Pls suggest..
thanks
Atul

<body >
    <form id="form1" runat="server">
        <table class="auto-style1">
            <tr>
                <td style=" background: url(/Images/texturewood.jpg) ">
                    <table class="auto-style1">
                        <tr>
                            <td style="background-color: #52220D">&nbsp;</td>
                        </tr>
                        <tr>
                            <td>
                                <table class="auto-style1">
                                    <tr>
                                        <td class="auto-style2">
                                            <table class="auto-style1">
                                                <tr>
                                                    <td>&nbsp;</td>
                                                    <td class="auto-style3">website</td>
                                                    <td class="auto-style6">&nbsp;&nbsp;&nbsp; &nbsp;</td>
                                                </tr>
                                                </table>
                                        </td>
                                        <td>
                                            <img alt="company Ltd" class="auto-style7" src="Images/logo%20small.png" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </td>
                                        <td>&nbsp;</td>
                                    </tr>
                                </table>
                                <table class="auto-style1">
                                    <tr>
                                        <td>&nbsp;</td>
                                        <td>&nbsp;</td>
                                        <td>&nbsp;</td>
                                    </tr>
                                </table>
                                <table class="auto-style1">
                                    <tr>
                                        <td>&nbsp;</td>
                                        <td>
                                            <asp:ContentPlaceHolder ID="ContentPlaceHolder2" runat="server">
                                            </asp:ContentPlaceHolder>
                                        </td>
                                        <td>&nbsp;</td>
                                    </tr>
                                </table>
                                <table class="auto-style1">
                                    <tr>
                                        <td>&nbsp;</td>
                                        <td>&nbsp;</td>
                                        <td>&nbsp;</td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td>&nbsp;</td>
                        </tr>
                    </table>
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <table class="auto-style1">
                        <tr>
                            <td style="background-color: #55250F">&nbsp;</td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    <div>
        <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">

        </asp:ContentPlaceHolder>
    </div>
    </form>
</body>

推荐答案

设置网址如

background:url(../ Images / texturewood.jpg)
set url like
background: url(../Images/texturewood.jpg)


background-image:url(<%=ResolveClientUrl("~/Images/texturewood.jpg")%>);





以上是我发现的分辨率。通过这种方式,图像开始在已发布的网站上显示,但在视觉工作室停止显示。



感谢您的回复



The above was the resolution I found. In this way the image started showing on published website but stopped showing in visual studio.

Thanks all for your response


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

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