<style>
.style-0{
background: red;
}
.style-1{
background: red;
}
.style-2{
background: blue;
}
.style-3{
background: green;
}
.style-4{
background: red;
}
.style-5{
background: blue;
}
.style-6{
background: green;
}
.style-7{
background: red;
}
.style-8{
background: blue;
}
.style-9{
background: green;
}
</style>
<body>
Рэндом фон.
<script>
document.body.className = 'style-' + parseInt(Math.random() * 10);
</script>
</body>