從瀏覽網頁看來,CSS屬性值(如HTML屬性值)可以被引用或不引用。然而,在JSFiddle中,如果值不加引號,我只能讓CSS工作。可以引用CSS屬性值嗎?
這裏的HTML例子:
<div id="withQuotes">The CSS for this has quoted parameter values.</div>
<div id="withoutQuotes">The CSS for this has unquoted parameter values.</div>
而這裏的CSS:
#withQuotes {
font-size:"x-large";
width:'100px';}
#withoutQuotes {
font-size:x-large;
width:100px;
}
以上被保存在http://jsfiddle.net/8EMyW/
你不引用CSS值。 – Xarcell