CSS:这个星号(*)是什么? [英] CSS: What this Asterisk (*) does?
本文介绍了CSS:这个星号(*)是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这行代码适用于Apple.com的导航栏。
this line of code is for the navigation bar of Apple.com
#globalheader #globalnav[class*="nosearch"] { width:100%; }
有人知道类后的星号是什么意思?
Somebody know what that asterisk after class means there?
推荐答案
#globalnav[class*="nosearch"]
表示:包含nosearch
means: class contains "nosearch"
#globalnav[class^="nosearch"]
表示:开头为nosearch
means: class starts with "nosearch"
#globalnav[class$="nosearch"]
表示: strong>nosearch
means: class ends with "nosearch"
参考:
http://reference.sitepoint.com/css/css3attributeselectors
这篇关于CSS:这个星号(*)是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文