开发者

Are Undefined CSS Classnames in IE7 and IE8 Expensive?

If classnames are referenced in HTML but not defined in CSS, is there a performance penalty in IE7, IE8, or Firefox?

<div class="undefined_c开发者_Go百科lass">Text</div>


Ther's no particular penalty (it's just a matter of document size increasing) but a class not necessarily must be defined for styling purposes. It could be used also for DOM manipulation via javascript


No. You don't define classes in CSS, you write rules that apply to that class using the CSS class selector, or .. You define the class for that element in the html.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜