Loading ...
Sorry, an error occurred while loading the content.

CSS content property

Expand Messages
  • pauanyu
    @charset UTF-8 ; div { content: counter(foo) . attr(bar); } Three things: 1) content is only supposed to be used on the :before, ::before, :after, and
    Message 1 of 1 , Sep 2, 2009
    • 0 Attachment
      @charset "UTF-8";
      div {
      content: counter(foo) "." attr(bar);
      }

      Three things:

      1) content is only supposed to be used on the :before, ::before, :after, and ::after pseudo-elements. Opera supports it on any element, in case that matters any.

      2) content can accept an "attr()" property.

      2) content can accept multiple values, but JSLint expects content to only have one. Here are the error messages:


      Problem at line 3 character 27: Expected ';' and instead saw '.'.

      Problem at line 3 character 31: Unrecognized style attribute 'attr'.

      Problem at line 3 character 35: Expected ':' and instead saw '('.
    Your message has been successfully submitted and would be delivered to recipients shortly.