编辑在其类名称中具有空格的元素的CSS样式 [英] edit css style of an element with a space in its class name

查看:200
本文介绍了编辑在其类名称中具有空格的元素的CSS样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建一个tumblr他们,我必须编写一个外部CSS文件,但我有麻烦编辑post元素的CSS样式。

I'm creating a tumblr them and I have to write an external CSS file but I am having trouble editing the css style of the post elements.

其结构如下:

<li class="post quote">
    {other code}
</li>



问题是类名中有空格。 br>

我如何创建一个CSS类来访问它?是的,我知道我可以在元素标签中添加一个样式属性,但我希望另一个选项。


The problem is that the class name has a space in it.

How would I create a CSS class to access this? And yes, I know I can just put a style attribute in the element tag but I was kind of hoping for another option.

推荐答案


问题是类名中有空格。

The problem is that the class name has a space in it.

你可以这样处理:

.post.quote { .... }

但在你的情况下,最好使用有效的分隔符,例如

but in your case, it's probably better to use a valid separator like

post_quote

这篇关于编辑在其类名称中具有空格的元素的CSS样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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