html – CSS属性以插入符号开头
发布时间:2020-12-14 19:39:21 所属栏目:资源 来源:网络整理
导读:我目前正在维护的项目中的许多CSS属性都以插入符号开头,如下所示: tr style="^padding-bottom: 10px;" 插入符号有什么意义吗?也许修复了一些不起眼的浏览器?或者它只是来自以前的开发人员的一个错误,已被复制粘贴x次(因为它总是与’padding-bottom’一起)
我目前正在维护的项目中的许多CSS属性都以插入符号开头,如下所示:
<tr style="^padding-bottom: 10px;"> 插入符号有什么意义吗?也许修复了一些不起眼的浏览器?或者它只是来自以前的开发人员的一个错误,已被复制粘贴x次(因为它总是与’padding-bottom’一起)? 解决方法
它们前面带有插入符号的样式不适用.因此,在这种情况下,它可能是一种注释掉CSS样式的方法,而不必使用整个HTML注释.但这不是一种标准的方法.
(Example) CSS中的插入符号确实有意义,即“开始于”Attribute selector. 它允许您根据属性的值是否以给定字符串开头来定位CSS中的元素. E[foo] an E element with a "foo" attribute E[foo="bar"] an E element whose "foo" attribute value is exactly equal to "bar" E[foo~="bar"] an E element whose "foo" attribute value is a list of whitespace-separated values,one of which is exactly equal to "bar" E[foo^="bar"] an E element whose "foo" attribute value begins exactly with the string "bar" E[foo$="bar"] an E element whose "foo" attribute value ends exactly with the string "bar" E[foo*="bar"] an E element whose "foo" attribute value contains the substring "bar" 但是,在您的情况下,插入符号不能用作选择器. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |