【问题标题】:Image doesn't display in Internet Explorer图像不显示在 Internet Explorer 中
【发布时间】:2013-03-20 03:23:30
【问题描述】:

在我的 aspx 文件中,

<div id="blueBar">
        <div style="position: absolute;">
            <asp:Image ID="Image1" runat="server" ImageUrl="~/Styles/images/blueBar_01.jpg" Width="150px"
                Style="margin-top: 4px" /><br />
        </div>
        <div style="top: 35%; position: absolute">
            <asp:Image ID="Image2" runat="server" ImageUrl="~/Styles/images/blueBar_02.jpg" Width="150px" /><br />
        </div>
        <div style="position: absolute; bottom: 0">
            <asp:Image ID="Image3" runat="server" ImageUrl="~/Styles/images/blueBar_03.jpg" Width="150px" /><br />
        </div>
    </div>

火狐浏览器可以显示图片(Image1,Image2,Image3)。
但 Internet Explorer 无法显示!我看到了十字标志。我想知道为什么以及如何解决?
我用的是IE版本(8.0.7601.17514)

【问题讨论】:

  • 请务必检查源代码并查看为您的图像源生成的确切内容。您应该能够确定它指向的位置并从那里进行更正。

标签: asp.net internet-explorer firefox


【解决方案1】:

如果您的 Style 文件夹位于根级别,请尝试:-

<div id="blueBar">
        <div style="position: absolute;">
            <asp:Image ID="Image1" runat="server" ImageUrl="Styles/images/blueBar_01.jpg" Width="150px"
                Style="margin-top: 4px" /><br />
        </div>
        <div style="top: 35%; position: absolute">
            <asp:Image ID="Image2" runat="server" ImageUrl="Styles/images/blueBar_02.jpg" Width="150px" /><br />
        </div>
        <div style="position: absolute; bottom: 0">
            <asp:Image ID="Image3" runat="server" ImageUrl="Styles/images/blueBar_03.jpg" Width="150px" /><br />
        </div>
    </div>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-05-19
    • 2020-03-30
    • 1970-01-01
    • 2010-11-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-11-09
    相关资源
    最近更新 更多