开发者

Are multiple CSS classes per tag safe to use?

I am starting up a brand new web project and would like to know if I can safely use multiple CSS classes nowadays.

<div class="float-left bold bordered"></div>

Do most common browsers support this开发者_Go百科, or will a significant percentage of my visitors run into major trouble viewing the page?

I'm not worried about special cases like Netscape 1.0 users, but browsers and versions usually used in companies these days.


Nearly any modern browser should support this, it is apparently buggy in IE <= 6, but you should be fine as this lack of functionality would hinder many major sites / applications.

The following link has a chart showing support for multiple CSS classes by browser:

CSS Support By Browser

Netscape 1.0 will probably not support this, as Netscape lacked support for it in 4.0. Source

Netscape 4.0+

  • Multiple class names for an element are not supported.


Yes, every major browser supports this.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜