应用多种样式 [英] Applying multiple styles

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

问题描述

你好,
谁能告诉我如何应用多种样式进行控制..
例如

我有2种样式

Hi there,
Can anyone tell me how can I apply multiple style to control..
For instance

I have 2 styles named

.Color
{
}
  
  and

.Size
{
}


标签如何获取两者的属性??

在此先感谢


How can a Label Get the properties of both???

Thanks in advance

推荐答案

您可以将多个类分配给任何HTML元素,如下所示:

You can assign multiple classes to any Html Element like this:

<div class="Color Size"></div>


在标签class="Color Size"中用空格分隔类

那么,如果两个类都具有相同属性的样式怎么办?然后使用!important关键字
In the label class="Color Size" separate the classes with a space

So what if both classes has style for same attributes? Then give priority in one class style elements using the !important keyword


这篇关于应用多种样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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