我正在處理的一個頁面有時在粗體內顯示span,而在其他頁面中,它顯示的是未標記相同標記的頁面。爲什麼在除Firefox之外的每個瀏覽器中都會使用粗體顯示?
好(產品詳細資料爲粗體) - Screenshot
<div class=infoPanel><span>Product Details</span><br /><ul><li>7.7% APR for loans between £7,500 to £14,999 for up to 5 years</li><li>Available if you are a main FlexAccount customer</li><li>No obligation quotes</li><li>Quotes tailored to your individual circumstances and the amount you would like to borrow</li><li>Quick decision on your loan application</li><li>Between 1 and 7 years repayment terms available</li><li>A fixed rate for the term of your loan</li><li>No hidden fees or charges</li><li>For the first month no repayments have to be made</li></ul></div>
壞(產品詳細信息是不加粗) - Screenshot
<div class=infoPanel><span>Product Details</span><br /><ul><li>Easy to apply and you will get a decision in minutes</li><li>Receive your cheque in 24 hours</li><li>Protect your personal loans against the things that worry you </li><li>Apply for an instant personal loan online today</li></ul></div>
實際頁面here。
這隻發生在Firefox。在所有其他瀏覽器中,「產品詳細信息」的兩個實例均爲粗體。我沒有看到任何可能影響樣式的父級HTML元素。
任何想法,爲什麼會發生這種情況?
使用Firebug發現區別。可能與在你的css中用作選擇器的父代有關。 – jerone 2010-08-16 15:17:53
問題(和它真的很討厭)是他似乎在使用內聯行爲,這意味着懸停框的HTML從不顯示(除'onmouseover'屬性外) – 2010-08-16 15:22:03
是的,Firebug是我嘗試的第一件事。內聯HTML無法定位,因爲它位於onmouseover。而且,如果我更改onmouseover中的HTML,彈出窗口不會再顯示,除非我重新加載頁面,因爲Firebug似乎不允許實時編輯Javascript。 – 2010-08-16 15:30:13