Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

css content from data attribute


div { 
	content: attr(id); /* Get content from the ID */
	content: attr(class); /* Get content from the class attribute */
  	content: attr(data-custom); /* Get content from a custom attribute, e.g. <div data-custom="My Content">*/
}
Source by davidwalsh.name #
 
PREVIOUS NEXT
Tagged: #css #content #data #attribute
ADD COMMENT
Topic
Name
2+9 =