2012-06-27 76 views
1

昨晚我碰到這個問題在我的CSS不會影響img標籤以下HTML:CSS的ID不影響img標籤

<div class='container'> 
    <div id="grid"><img src='test.jpg' /></div> 
</div> 

的CSS如下:

#grid img { position:relative; top:75px; border:5px solid white; } 

一切都應該工作正常,但是當我在上傳的CSS文檔上查看源代碼時,發現在上一行末尾處輸入了一個特殊字符:

#grid p { float:right; font-size:34px; }​ 
#grid img { position:relative; top:75px; border:5px solid white; } 

回答

2

突出顯示該區域並在我的IDE中單擊退格可解決問題。在這裏要發佈問題,所以我想我會添加知識來拯救別人的麻煩。