JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="utf-8" />
<title>title</title>
<style type="text/css">
*{
margin: 0;
padding: 0;
}
html{
height: 100%;
}
#wrap{
width: 100%;
height: 300px;
position: relative;
display: flex;
align-items: center;
justify-content: center;
/*background-color: rgb(33, 150, 243);*/
}
#wrap > button{
width: 100px;
height: 100px;
display: block;
position: absolute;
left: calc(50% - 50px);
top: calc(50% - 50px);
/*cursor: pointer;
border: none;
border-radius: 2px;
box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
background-color: rgb(255,255,255);
transition: all .2s 0s;*/
}
#wrap > button:active{
/*box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);*/
}
#wrap > button:nth-child(1){
transform: translateX(-100px);
}
#wrap > button:nth-child(2){
transform: translateY(-100px);
}
#wrap > button:nth-child(3){
transform: translateX(100px);
}
#wrap > button:nth-child(4){
transform: translateY(100px);
}
</style>
</head>
<body>
something above ...<br>
something more above ...<br>
<div id="wrap">
<button class="touch left" onclick="steer_left()">Steer Left</button>
<button class="touch top" onclick="accelerate()">Accelerate</button>
<button class="touch middle" onclick="stop()">Stop</button>
<button class="touch bottom" onclick="reverse()">Reverse</button>
<button class="touch right" onclick="steer_right()">Steer...