Commit 934d9540 authored by Benjamin Gallois's avatar Benjamin Gallois

Stripe fine tuning

parent 4b05e2ff
#body {
#body, #body2{
width: 100%;
height: 100%;
background: repeating-linear-gradient(
......@@ -12,18 +12,3 @@
left: 0%;
}
#body2 {
width: 100%;
height: 100%;
background: repeating-linear-gradient(
90deg,
white,
white 1%,
black 1%,
black 2%
);
position: fixed;
left: -100%;
}
<html>
<head>
<meta charset="UTF-8">
<title>Phototaxis fête de la science</title>
<link rel="stylesheet" type="text/css" href="stripe.css">
</head>
......
var body = document.getElementById('body');
var body2 = document.getElementById('body2');
var dw = 1;
var velocity = 1;
var velocity = 0.2;
var stop = true;
var x = 0;
......@@ -36,19 +36,20 @@ window.addEventListener("keyup", function(event) {
}
}
if (event.keyCode === 39) {
velocity += 5;
velocity += 0.1;
}
if (event.keyCode === 37) {
velocity -= 5;
velocity -= 0.1;
}
if (event.keyCode === 38) {
dw += 0.0003*window.innerWidth;
dw += 0.1;
body.style.background = 'repeating-linear-gradient( 90deg, white, white ' + dw + '%, black '+ dw + '%, black ' + dw*2+'%)'
body2.style.background = 'repeating-linear-gradient( 90deg, white, white ' + dw + '%, black '+ dw + '%, black ' + dw*2+'%)' }
body2.style.background = 'repeating-linear-gradient( 90deg, white, white ' + dw + '%, black '+ dw + '%, black ' + dw*2+'%)'
}
if (event.keyCode === 40) {
dw -= 0.0003*window.innerWidth;
dw -= 0.1;
body.style.background = 'repeating-linear-gradient( 90deg, white, white ' + dw + '%, black '+ dw + '%, black ' + dw*2+'%)'
body2.style.background = 'repeating-linear-gradient( 90deg, white, white ' + dw + '%, black '+ dw + '%, black ' + dw*2+'%)'
}
}
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment