1

How do I rotate an element by its data-rotate attribute using attr() ? something like:

transform: rotate(attr(data-rotate deg))
hpn
  • 2,222
  • 2
  • 16
  • 23
  • See [MDN](https://developer.mozilla.org/en/docs/Web/CSS/attr) for comprehensive information and current browser compatiblity. I'd recommend using JavaScript for now, until browsers fully support the `attr()` expression. – Aziz Feb 28 '16 at 21:59

1 Answers1

1

According to the documentation attr is experimental for properties other than content.

drosam
  • 2,866
  • 3
  • 16
  • 18