处理css id和具有空格的类 [英] handling css id and classes with spaces

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

问题描述

我有一个段落

<p id="para one" class="paragraph one">Content</p>

如何用css中的空格表示id和类别

How does one represent the id and class with spaces in the css

当我使用

#para#one{
}

.paragraph.one{
}

它不适用于上面的css。

It does not work with the css above.

推荐答案

class="paragraph one" 

实际上代表两个不同的类

actually represents two different classes

id="para one"

将无法工作,但您可能会得到一个实际的id para

won't work, but you'll probably end up having an actual id of para

这篇关于处理css id和具有空格的类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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