mercredi 24 décembre 2014

Random CSS value

I have this page where I have 3 triangles made purely out of CSS. Every time someone loads the page I want the triangle to have different sizes.


Here's the thing illustrated in a JSFiddle : http://ift.tt/1AK9ZMz


What I would like to do is to randomly set the value of border-width of every triangle at page load.


I was thinking doing that with JavaScript with a Math.random or something but I didn't manage to do it, nor found some help on the internet (I don't know how to write in Javascript).


I would appreciate a little help or guidance for this. Thanks a lot





Aucun commentaire:

Enregistrer un commentaire