开发者

CSS Counters - used with the content property only?

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜