{"id":3141471,"date":"2012-10-24T14:05:00","date_gmt":"2012-10-24T14:05:00","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/php-variable-as-css-value\/"},"modified":"2016-08-20T16:55:57","modified_gmt":"2016-08-20T16:55:57","slug":"php-variable-as-css-value","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/php-variable-as-css-value\/","title":{"rendered":"PHP variable as css value"},"content":{"rendered":"<p>Hi,<br \/>\nI&#8217;m trying to change the value of:<\/p>\n<pre><code>.entry{\ntransform:rotate(&lt;?php echo $random_number; ?&gt;);\n-ms-transform:rotate(&lt;?php echo $random_number; ?&gt;); \/* IE 9 *\/\n-moz-transform:rotate(&lt;?php echo $random_number; ?&gt;); \/* Firefox *\/\n-webkit-transform:rotate(&lt;?php echo $random_number; ?&gt;); \/* Safari and Chrome *\/\n-o-transform:rotate(&lt;?php echo $random_number; ?&gt;); \/* Opera *\/\n}<\/code><\/pre>\n<p>on each post in the loop, to turn the thumbnail at a slightly different angle for  each post.<\/p>\n<p>(The to mimic a polaroid being thrown down)<\/p>\n<p>I&#8217;m using this php function:<\/p>\n<p><code>&lt;?php $random_number = mt_rand(-20, 20);?&gt;<\/code><\/p>\n<p>Any help would be greatly appreciated.<\/p>\n","protected":false},"template":"","class_list":["post-3141471","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/3141471","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/3141471\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=3141471"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}