表不可见. [英] Table Not Visible.

查看:87
本文介绍了表不可见.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

实际上,我正在使用ASP.NET进行项目.
我在页面上创建了一个表格,然后想在该表格中插入背景图片.

我使用了以下代码.

Actually I am making a project using ASP.NET.
I create a table on my page then i want to insert a background image into that table.

I used the following code.

<asp:Table ID="Table1" runat="server" Style="z-index: 100; left: 0px; position: absolute;
            top: 0px" BackImageUrl="img1.jpg">
            <asp:TableRow runat="server">
                <asp:TableCell runat="server"></asp:TableCell>
                <asp:TableCell runat="server"></asp:TableCell>
            </asp:TableRow>
            <asp:TableRow runat="server">
                <asp:TableCell runat="server"></asp:TableCell>
                <asp:TableCell runat="server"></asp:TableCell>
            </asp:TableRow>
        </asp:Table>




但是当我运行该页面时,我得到了一个没有任何图像的白色页面.
请有人帮助我,以便我得到想要的结果.

在此先感谢
问候
Shweta:rose:




But when I run the page I got a white one without any image.
Please someone help me so that i can get the desired result.

Thanks in Advance
Regards
Shweta:rose:

推荐答案

所有表格单元格中都没有任何内容,

你试过了吗
None of the table cells have anything in them,

have you tried
<asp:TableCell runat="server">Hello</asp:TableCell>
<asp:TableCell runat="server">World</asp:TableCell>



等吗?



Etc?


除了Keith所建议的那样,您还没有为表提供任何高度-宽度.而且由于表中没有数据,因此可能是该表存在但在左上角.

使用样式属性将高度和宽度赋予表格,您应该能够看到背景图像.
Adding to what Keith has suggested, you have not given any height-width to your table. And since there is no data in your table, it might be that table is present but at the left top corner.

Give a Height-Width to the table using Style proerty and you should be able to see the background image.


这篇关于表不可见.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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