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://jsfiddle.net/qaF24/4/
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).
[EDIT] I forgot to say that I would like to add a min and max value.
I would appreciate a little help or guidance for this. Thanks a lot
document.querySelector. To change styles of an element, update the appropriate camel-cased property of itsstyleproperty, e.g.element.style.borderRightWidth = "5px";. You can indeed useMath.randomto generate random numbers. With these ingredients you should hopefully be able to get on the right track.