【问题标题】:img will not render in Safariimg 不会在 Safari 中呈现
【发布时间】:2014-02-15 15:45:40
【问题描述】:

我正在开发一个可以在 ie 中运行但不能在 Safari 中运行的旧版应用程序。 代码中的图像不会在 Safari 中呈现。

     <section class="feature pointer clickableSection tooltipContainer" id="SearchSection" 
                    data-scd-nextScreen="@Url.Action("FullSearch", "Company")"data-placement="bottom"
                    data-toggle="tooltip" data-title="Click here to SEARCH Addresses">
            <img src="@Url.Content("~/images/phonebook.png")" alt="Click here to SEARCH Addresses" />
            <h3><span style="text-decoration: underline">Search Addresses</span><span id="searchHeading"></span></h3>
            <div class="loadMessage"></div>       
        </section>

我已经启动并运行了 Safari Web Inspector,但我看不到哪里可以找到问题所在。我是新手。

【问题讨论】:

  • 您的服务器代码与问题无关。请显示您的实际输出。
  • 您在本节中看到的是

    元素中的标题文本,即搜索地址,但其上方的 元素不会在 Safari 中呈现 - 它会在 ie 中呈现。跨度>

标签: asp.net-mvc html safari safari-web-inspector


【解决方案1】:

我找到了问题所在。 在我没有发布的 CSS 中,它有;

section.feature img {
    color: #999;
    /*content: attr(alt);*/
    font-size: 1.5em;
    font-weight: 600;
    height: 140px;
    width: 200px;
}

我已经注释掉了与Safari不兼容的那一行,即内容:attr(alt);

【讨论】:

    猜你喜欢
    • 2017-01-07
    • 1970-01-01
    • 2022-11-23
    • 1970-01-01
    • 2020-10-11
    • 1970-01-01
    • 1970-01-01
    • 2017-09-01
    • 1970-01-01
    相关资源
    最近更新 更多