According to the spec, can/will CSS counters only be used in conjunction with the content
property?
* { content: counter(mycounter) "! "; counter-increme开发者_开发技巧nt: mycounter }
Or can/will they also be used with other properties, such as (random example) padding
?
/*
is this possible?
is this supposed to be possible?
*/
* { padding:counter(mycounter)px; }
Lastly, if that is a feature of CSS, to what extent is it implemented in browsers?
In CSS2.1, the counter()
function is indeed defined for use with the content
property only; you cannot use counters to specify numeric values for other properties.
精彩评论