battleship/demo/public2/style.css

151 lines
1.9 KiB
CSS
Raw Normal View History

2022-09-14 09:34:39 +00:00
* {
margin: 0px;
padding: 0px;
box-sizing: border-box;
}
body {
width: 100vw;
height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
body,
input,
select,
button {
font-family: monospace;
font-size: 20px;
}
input,
button {
border: 1px solid #333;
padding: 10px;
border-radius: 0px;
}
button {
cursor: pointer;
}
.text-center {
text-align: center;
}
.container {
display: flex;
}
.row {
flex-direction: row;
margin: 1rem 0;
justify-content: space-between;
}
.column {
flex-direction: column;
margin: 0 1rem;
}
.grid {
width: 430px;
height: 430px;
padding: 5px;
display: flex;
flex-wrap: wrap;
background-color: #003768;
}
.grid span {
width: 40px;
height: 40px;
margin: 1px;
background-color: #3987c9;
position: relative;
}
.grid span.hot {
background-color: #7fffd4;
}
.ship {
display: flex;
flex-wrap: wrap;
flex-direction: row;
z-index: 10;
position: relative;
margin: -1px;
}
.ship.vertical {
flex-direction: column;
}
.carrier {
width: 210px;
height: 40px;
}
.carrier.vertical {
width: 40px;
height: 210px;
}
.battleship {
width: 168px;
height: 40px;
}
.battleship.vertical {
width: 40px;
height: 168px;
}
.cruiser,
.submarine {
width: 126px;
height: 40px;
}
.cruiser.vertical,
.submarine.vertical {
width: 40px;
height: 126px;
}
.destroyer {
width: 84px;
height: 40px;
}
.destroyer.vertical {
width: 40px;
height: 84px;
}
.ship span {
width: 40px;
height: 40px;
background-color: lightblue;
}
.ship .head {
border-radius: 20px 0 0 20px;
}
.ship .tail {
border-radius: 0 10px 10px 0;
}
.ship.vertical .head {
border-radius: 20px 20px 0 0;
}
.ship.vertical .tail {
border-radius: 0 0 10px 10px;
}