Safari无法在html页面中显示bg图像

时间:2016-12-26 07:41:24

标签: css safari background-image

今天我遇到了Safari的问题。在我使用Safari查看的网站中,我发现给出的bg图像没有显示。以下是我的代码: 我根据论坛尝试了很多方法,但没有什么对我有用。其他浏览器都很完美。

<div class="post-holder wow zoomIn animated" data-wow-duration=".5s" style="visibility: visible; animation-duration:.5s; animation-name: zoomIn;">
      <div class="post-img img-full" style="background: url( http://localhost/wivedit/theme/sw/images/sw_screen.jpg") bottom center no-repeat;></div>
            <div class="post-overlay" style="display: block; opacity: 0;">
                <div class="overlya-content">
                     <div class="tag" id="Sports">#Sports</div>
                    <div class="hash">#trump #uselection16</div>
                    <div class="content">
                        <span>Dozen </span>
                    </div>
                    <div class="aurthor">By Panther </div>
                    <div class="stats">
                        <span>0 Likes</span>
                        <span>0 views</span>
                   </div>
                </div>
            </div>
        </div>

css与班级有关:

.img-full {
background-position: 50% 50%!important;
min-height: 494px;
background-size: cover!important;
-o-background-size: cover;
-moz-background-size: cover;
-webkit-background-size: cover;
}

我怎样才能解决这个问题?

解决: 编辑代码: 在图片路径之前和之后添加了单引号

<div class="post-img img-full" style="background: url('http://localhost/wivedit/theme/sw/images/sw_screen.jpg') bottom center no-repeat;"> </div>

0 个答案:

没有答案