pi-tank
Version:
Raspberry Pi Tank, play with 🎮 PS DualShock 2 or scripts.
78 lines (66 loc) • 1.15 kB
CSS
* {
padding: 0;
margin: 0;
font-family: monospace;
-webkit-user-select: none;
}
body {
background-color: #000;
}
#dashboard, #axis, #breaker {
position: fixed;
z-index: 1;
}
#dashboard {
width: 100vh;
height: 100vh;
z-index: 0;
padding: 10px;
font-size: 18px;
color: #7CFC00;
}
#axis, #breaker {
background-color: #eee;
left: 0;
right: 0;
margin: 0 auto;
cursor: pointer;
border: none;
}
#axis {
width: 50vh;
height: 50vh;
border-radius: 50%;
top: 25%;
background-image: url(axis.png);
background-size: 100%;
background-repeat: no-repeat;
background-position: center;
}
#axis.active, #axis::after {
background-image: url(axis-active.png);
}
#axis-analog {
width: 70%;
height: 70%;
border-radius: 50%;
margin: 15% auto;
background-color: #bbb;
}
#breaker {
font-size: 24px;
font-weight: bolder;
padding: 10px 15px;
border-radius: 5px;
bottom: 15px;
}
#breaker.on {
color: red;
}
#breaker.off {
color: green;
}
#breaker:active {
color: #fff;
background-color: #666;
}