CSS选择器* + *的定义? [英] CSS selector * + * definition?

查看:50
本文介绍了CSS选择器* + *的定义?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

css选择器* + *的实际含义是什么?执行检查元素时,您可以在Google chrome的控制台中看到它.根据我的说法,似乎是对第二个孩子"应用了一种样式,但仍想确定.有人可以帮我吗?

What does the css selector * + * actually mean? You can see it it in google chrome's console when you do an inspect element. According to me it seems like applying a style to "Every second child" , but still want to be sure. Can anyone help me out?

示例:

*+* {
   margin-top:1em;
}

推荐答案

* + * 的意思是任何具有先前同级元素的元素"-换句话说,不是第一个孩子.

* + * means 'any element that has a previous sibling' - in other words, is not a first child.

这篇关于CSS选择器* + *的定义?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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