CSS更短查询 [英] CSS more short query

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

问题描述

例如,我有一个CSS选择器:

For example I have a CSS selector:

#spotlightPlayer .container .commands.over span,
#spotlightPlayer .container .commands.over ul,
#spotlightPlayer .container .commands.over ul li { clear:both }

有一种写法,

(#spotlightPlayer .container .commands.over) span, ul, ul li { clear:both }


推荐答案

可以使用某种类型的CSS预处理器,如 Shaun Inman的CSS服务器端预处理器处理器转换:

You could use some kind of CSS pre-processors like Shaun Inman’s CSS server-side pre-processor to convert this:

#spotlightPlayer .container .commands.over {
    span,
    ul,
    ul li { clear:both }
}

这个:

#spotlightPlayer .container .commands.over span,
#spotlightPlayer .container .commands.over ul,
#spotlightPlayer .container .commands.over ul li { clear:both }

本身没有这种语法。

这篇关于CSS更短查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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