index.html with gradient!

master
Castro0o 8 years ago
parent 1e8a6062f3
commit 258215800f

@ -4,6 +4,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
<title>XPUB Special Issues</title> <title>XPUB Special Issues</title>
<link rel="stylesheet" href="style.css"> <link rel="stylesheet" href="style.css">
</head> </head>
<body> <body>
<div id="header"><h1>XPUB Special Issues</h1></div> <div id="header"><h1>XPUB Special Issues</h1></div>
@ -73,4 +74,31 @@
</div> </div>
</div> </div>
</body> </body>
<script>
function rand_deg(){
var deg = Math.round(Math.random()*180)+'deg';
return deg
}
function rand_rgb(){
function rand(){v = Math.round(Math.random()*255);
return v}
var color = 'rgb('+rand()+','+ rand() +','+ rand() + ')'
return color
}
var gradient = 'background:linear-gradient(' +
rand_deg() + ',' +
rand_rgb() +
',' +
rand_rgb() +
')';
var body = document.getElementsByTagName("body")[0];
body.setAttribute("style", gradient);
</script>
</html> </html>

@ -1,3 +1,8 @@
body {
/*background: linear-gradient( 45deg, blue, red );*/
}
h1 { h1 {
font-size: calc(3vW + 3vH); font-size: calc(3vW + 3vH);
text-align: center; text-align: center;
@ -17,3 +22,5 @@ iframe {
height: 60vH; height: 60vH;
} }
a, a:visited {color: black;}
Loading…
Cancel
Save