添加多个类 [英] Adding more than one class

查看:135
本文介绍了添加多个类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我为一个对象添加多个类,这是坏事。让我们说:

Is it bad thing if I add more than one class for one object. Let's say:

< a href =#class =parenclass =defaul> text< / a>

不要问我为什么,我只是需要它。

Don't ask me why, I just need it.

推荐答案

您可以使用多个类名(一个完全正常的事情),但只允许HTML类中的一个类属性元件。

You can use multiple class names (a perfectly normal thing to do), but are only allowed one class attribute on your HTML element.

这样做:

<a href="#" class="paren defaul">text</a>

这篇关于添加多个类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆