Answers for "how to set value in css from attribute in html"

CSS
1

css use value of attribute

/* html */
<p data-foo="Lorem Ipsum"></p>

/* css */
[data-foo]::before {
  content: attr(data-foo);
}
Posted by: Guest on June-18-2021

Code answers related to "how to set value in css from attribute in html"

Browse Popular Code Answers by Language