PHP variable as css value
-
Hi,
I’m trying to change the value of:.entry{ transform:rotate(<?php echo $random_number; ?>); -ms-transform:rotate(<?php echo $random_number; ?>); /* IE 9 */ -moz-transform:rotate(<?php echo $random_number; ?>); /* Firefox */ -webkit-transform:rotate(<?php echo $random_number; ?>); /* Safari and Chrome */ -o-transform:rotate(<?php echo $random_number; ?>); /* Opera */ }
on each post in the loop, to turn the thumbnail at a slightly different angle for each post.
(The to mimic a polaroid being thrown down)
I’m using this php function:
<?php $random_number = mt_rand(-20, 20);?>
Any help would be greatly appreciated.
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘PHP variable as css value’ is closed to new replies.