/* @import url(https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700); */ * { margin: 0px; padding: 0px; box-sizing: border-box; } html, body { overflow-x: hidden; background-color: #ddd; } h1 { text-align: center; margin: 40px auto; color: darkblue; } .row { width: 1280px; margin: auto; display: flex; justify-content: space-between; border: 1px solid red; } .gameboard { width: 600px; height: 600px; padding: 5px; border-radius: 5px; background-color: darkblue; color: aquamarine; } #player1 tbody { cursor: pointer; } #player2 tbody { cursor: url(images/crosshair.png) 16 16, crosshair; } .gameboard tbody tr { display: flex; } .cell { width: 58px; height: 58px; margin: 1px; background: url(images/tile.png) no-repeat center; border-radius: 3px; z-index: 0; position: relative; overflow: visible; } .ship11 { background: url(images/ship1.png) -2px 0px no-repeat, url(images/tile.png) no-repeat center; } .ship12 { background: url(images/ship1.png) -2px -60px no-repeat, url(images/tile.png) no-repeat center; } .ship12h { background: url(images/boom60.png) 0px 0px no-repeat, url(images/ship1.png) -2px -60px no-repeat, url(images/tile.png) no-repeat center; } #ships { display: flex; justify-content: left; } .ship { width: 60px; border: 1px solid red; } .ship-carrier { height: 300px; background: url(images/ship1.png) -2px -1px no-repeat; } .ship-battleship { height: 240px; background: url(images/ship2.png) -2px -1px no-repeat; } .ship-destroyer { height: 180px; background: url(images/ship3.png) -2px -1px no-repeat; } .ship-submarine { height: 180px; background: url(images/ship4.png) -2px -1px no-repeat; } .ship-patrolboat { height: 120px; background: url(images/ship5.png) -2px -1px no-repeat; } .ship-carrier.ship-horizontal { width: 300px; } .ship-battleship.ship-horizontal { width: 240px; } .ship-destroyer.ship-horizontal, .ship-submarine.ship-horizontal { width: 180px; } .ship-patrolboat.ship-horizontal { width: 120px; } .ship-horizontal { width: 60px !important; transform-origin: top left; transform: rotate(-90deg); margin-top: 60px; } /* .ship1 { z-index: 1000; } .ship1::after { content: ''; z-index: 1000; position: absolute; top: 0; left: 0; background-position: bottom; background-size: cover; width: 60px; height: 300px; background: url(images/ship1.png) -2px 0px no-repeat; transform-origin: top left; transform: scaleY(-1) rotate(-90deg); } */ .gameboard tbody td:hover { /* border: 2px dashed aqua; */ } /* .container { width: 100vw; background-color: orange; margin: 10px auto; padding: 10px; display: flex; justify-content: space-evenly; } .gameboard { width: 600px; height: 600px; margin: 10px; background-color: aqua; } .ship { width: 100px; height: 20px; background-color: blue; border: 1px black solid; } */