2016-03-24 126 views
1

客戶端取得了通過微軟邊緣觀看時,有些圖片不能正常工作了點,但工作完全找到使用Chrome,火狐甚至老版本的IE:爲什麼我的圖像不能在Microsoft Edge中顯示?

微軟先進的IT顯示如下: enter image description here

我的代碼非常簡單:

.card .staff_pic { 
 
    width: 100%; 
 
    height: 100%; 
 
} 
 
.card .linkedin-icon { 
 
    margin-top: 10px; 
 
} 
 
.card { 
 
    height: 100%; 
 
    width: 20%; 
 
    overflow: hidden; 
 
    position: relative; 
 
    float: left 
 
} 
 
.card_content { 
 
    background-color: rgba(255, 255, 255, 0.5); 
 
    padding: 20px; 
 
    width: 100%; 
 
    height: 90%; 
 
    position: absolute; 
 
    bottom: -400px; 
 
    transition: all .5s ease; 
 
    color: #fff 
 
} 
 
.card_content h3 { 
 
    font-size: 28px; 
 
    margin-top: 1.5em; 
 
    color: #fff; 
 
    margin-bottom: 0px; 
 
} 
 
.card_content p { 
 
    font-size: 18px; 
 
    color: white; 
 
} 
 
.card:hover .card_content { 
 
    background-color: rgba(151, 145, 59, 0.8); 
 
    bottom: 30px; 
 
}
<div class="card"> 
 
    <img class="staff_pic alignnone size-medium wp-image-4306" src="http://www.carleyconsult.com/wp-content/uploads/2014/10/David.png" alt="David" /> 
 
    <div class="card_content"> 
 
    <h3>David Durham</h3> 
 
    Head of Bid Management &amp; Consultancy Services 
 
    <a href="#" target="_blank"> 
 
     <img class="linkedin-icon alignnone size-full wp-image-4321" src="../wp-content/uploads/2014/10/linkedin.png" alt="linkedin" width="37" height="36" /> 
 
    </a> 
 
    </div> 
 
</div>

任何幫助不勝感激。

+0

更正了鏈接 – MrJoshFisher

+0

它在Edge中對我很好。如果這是在一個活的網站,你可以發佈的網址? –

+0

http://www.carleyconsult.co.uk/about-us/是顯然有問題的地址 – MrJoshFisher

回答

1

我檢查的元件在邊緣和你<p><img>元素被渲染爲:

<p> 
    <img class="staff_pic alignnone size-medium wp-image-4310" alt="Jim" &nbsp;src="http://www.carleyconsult.co.uk/wp-content/uploads/2014/10/Jim.png"> 
</p> 

注意&nbsp;在那裏。這導致元素中斷。它在Chrome中正確渲染,所以我懷疑Edge做了些奇怪的事情。一種修復方法是運行一個jQuery腳本來搜索您的<img>元素以找到&nbsp;並將其刪除。這不是一個理想的解決方案,但我想不出一個更好的解決方案。至少有一次在尋找另一個!

+0

啊,這使得sence我有一個jQuery腳本來找到所有的p標籤,並把 第二個最後一個詞,以便我沒有任何ophan的話,禁用它,它的作品歡呼聲。 – MrJoshFisher

+0

樂意幫忙! :) –

相關問題