320 lines
6.2 KiB
CSS
320 lines
6.2 KiB
CSS
@import url(https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700);
|
|
html, body {
|
|
width: 100%;
|
|
padding: 0;
|
|
margin: 0;
|
|
background-color: #ddd;
|
|
min-width: 860px;
|
|
}
|
|
h1, h2, h3, h4, h5, h6, p, li, span {
|
|
font-family: 'Open Sans', Helvetica, Arial, sans-serif;
|
|
color: #222222;
|
|
}
|
|
a {
|
|
color: #222222;
|
|
font-weight: bold;
|
|
}
|
|
a:hover {
|
|
text-decoration: none;
|
|
}
|
|
div {
|
|
padding: 0;
|
|
margin: 0;
|
|
}
|
|
|
|
button {
|
|
font-family: 'Open Sans', Helvetica, Arial, sans-serif;
|
|
font-size: 1.2em;
|
|
color: #EEEEEE;
|
|
background-color: #25567B;
|
|
border: none;
|
|
margin: 1em auto 0 auto;
|
|
padding: 10px;
|
|
border-radius: 5px;
|
|
}
|
|
button:hover {
|
|
cursor: pointer;
|
|
background-color: #ffffff;
|
|
}
|
|
button:active {
|
|
background-color: #99C2E1;
|
|
}
|
|
#start-game,
|
|
#place-randomly,
|
|
#restart-game {
|
|
position: relative;
|
|
color: #FFFFFF;
|
|
background-color: #FF9200;
|
|
}
|
|
#start-game:hover,
|
|
#place-randomly:hover,
|
|
#restart-game:hover {
|
|
background-color: #FFB655;
|
|
}
|
|
#start-game:active,
|
|
#place-randomly:active,
|
|
#restart-game:active {
|
|
background-color: #FFCE8E;
|
|
}
|
|
|
|
#prefetch1 {
|
|
background: url('../img/cross-icon.svg');
|
|
}
|
|
#prefetch2 {
|
|
background: url('../img/cross-icon.png');
|
|
}
|
|
#prefetch3 {
|
|
background: url('../img/crosshair.png');
|
|
}
|
|
.prefetch {
|
|
background-repeat: no-repeat;
|
|
background-position: -9999px -9999px;
|
|
}
|
|
|
|
.tagline {
|
|
margin-bottom: 2em;
|
|
}
|
|
.instructions {
|
|
width: auto;
|
|
display: inline-block;
|
|
text-align: left;
|
|
margin: 0 auto 3em auto;
|
|
}
|
|
|
|
.container {
|
|
width: 870px;
|
|
text-align: center;
|
|
margin: 20px auto 100px auto;
|
|
}
|
|
.game-container {
|
|
position: relative;
|
|
}
|
|
#roster-sidebar, #stats-sidebar, #restart-sidebar {
|
|
width: 150px;
|
|
padding: 20px;
|
|
margin: 0;
|
|
background-color: #EEEEEE;
|
|
position: absolute;
|
|
top: 4.5em;
|
|
-webkit-border-radius: 5px;
|
|
-moz-border-radius: 5px;
|
|
border-radius: 5px;
|
|
}
|
|
#roster-sidebar, #restart-sidebar {
|
|
left: -200px;
|
|
}
|
|
#stats-sidebar {
|
|
right: -200px;
|
|
}
|
|
#roster-sidebar h2, #stats-sidebar h2, #restart-sidebar h2 {
|
|
margin: 0 0 1em 0;
|
|
text-align: center;
|
|
}
|
|
|
|
.fleet-roster {
|
|
position: relative;
|
|
margin: 0;
|
|
padding: 0;
|
|
list-style: none;
|
|
}
|
|
.fleet-roster, button {
|
|
opacity: 1;
|
|
-webkit-transition: opacity 0.5s ease-out;
|
|
-o-transition: opacity 0.5s ease-out;
|
|
transition: opacity 0.5s ease-out;
|
|
}
|
|
.fleet-roster li {
|
|
margin: 0.5em 0;
|
|
}
|
|
.fleet-roster li:hover {
|
|
color: #aaa;
|
|
cursor: pointer;
|
|
}
|
|
.fleet-roster .placing {
|
|
font-weight: bold;
|
|
}
|
|
.fleet-roster .placed {
|
|
visibility: hidden;
|
|
font-weight: bold;
|
|
opacity: 0;
|
|
-webkit-transition: all 0.2s ease-in;
|
|
-o-transition: all 0.2s ease-in;
|
|
transition: all 0.2s ease-in;
|
|
}
|
|
.invisible {
|
|
opacity: 0;
|
|
-webkit-transition: opacity 0.5s ease-in;
|
|
-o-transition: opacity 0.5s ease-in;
|
|
transition: opacity 0.5s ease-in;
|
|
z-index: -20;
|
|
}
|
|
.hidden {
|
|
display: none;
|
|
}
|
|
|
|
.grid-container {
|
|
width: 430px;
|
|
display: inline-block;
|
|
}
|
|
.grid-container h2 {
|
|
width: 430px;
|
|
display: inline-block;
|
|
}
|
|
|
|
.grid {
|
|
position: relative;
|
|
vertical-align: top;
|
|
padding: 5px;
|
|
height: 420px;
|
|
width: 420px;
|
|
background-color: #25567B;
|
|
-webkit-border-radius: 5px;
|
|
-moz-border-radius: 5px;
|
|
border-radius: 5px;
|
|
}
|
|
.grid-container:last-child {
|
|
margin-left: 10px;
|
|
}
|
|
.no-js {
|
|
width: 300px;
|
|
height: 300px;
|
|
margin: 100px auto;
|
|
display: inline-block;
|
|
color: #EEEEEE;
|
|
font-size: 2em;
|
|
}
|
|
.grid-cell {
|
|
vertical-align: top; /*clears the vertical space between rows*/
|
|
height: 40px;
|
|
width: 40px;
|
|
display: inline-block;
|
|
background-color: #99C2E1;
|
|
margin: 1px;
|
|
-webkit-border-radius: 2px;
|
|
-moz-border-radius: 2px;
|
|
border-radius: 2px;
|
|
}
|
|
.grid-cell:hover {
|
|
cursor: pointer; /* Fallback for IE */
|
|
background-color: #66A3D2;
|
|
}
|
|
.human-player .grid-cell:hover {
|
|
background-color: #99C2E1;
|
|
}
|
|
.computer-player .grid-cell:hover, .computer-player:hover {
|
|
cursor: url('../img/crosshair.png') 16 16, crosshair;
|
|
}
|
|
.grid-ship, .human-player .grid-ship:hover {
|
|
background-color: #808080;
|
|
}
|
|
.grid-miss, .grid-miss:hover, .human-player .grid-miss:hover {
|
|
background-color: #FFFFFF;
|
|
background-image: url('../img/cross-icon.png'); /* Fallback */
|
|
background-image: url('../img/cross-icon.svg');
|
|
background-position: center;
|
|
background-repeat: no-repeat;
|
|
}
|
|
.grid-hit, .grid-hit:hover, .human-player .grid-hit:hover {
|
|
background-color: #F60018;
|
|
background-image: url('../img/cross-icon.png'); /* Fallback */
|
|
background-image: url('../img/cross-icon.svg');
|
|
background-position: center;
|
|
background-repeat: no-repeat;
|
|
}
|
|
.grid-sunk, .grid-sunk:hover, .human-player .grid-sunk:hover {
|
|
background-color: #222222;
|
|
}
|
|
|
|
.highlight {
|
|
overflow: visible; /* Bugfix for IE */
|
|
}
|
|
.highlight:before {
|
|
content: "\2193";
|
|
font-weight: bold;
|
|
font-size: 75px;
|
|
color: #FF9200;
|
|
text-shadow: 0 0 5px #FF9200;
|
|
position: absolute;
|
|
width: 100px;
|
|
height: 100px;
|
|
top: -100px;
|
|
left: 50%;
|
|
margin-left: -50px;
|
|
-webkit-animation: highlight 1.5s infinite;
|
|
-o-animation: highlight 1.5s infinite;
|
|
animation: highlight 1.5s infinite;
|
|
}
|
|
.current-step {
|
|
font-weight: bold;
|
|
}
|
|
|
|
@media(max-width: 1300px) {
|
|
.container {
|
|
width: 440px;
|
|
}
|
|
.grid-container:last-child {
|
|
margin-left: 0;
|
|
}
|
|
}
|
|
|
|
|
|
@-webkit-keyframes highlight {
|
|
0% {
|
|
-webkit-transform: translateY(0);
|
|
transform: translateY(0);
|
|
}
|
|
50% {
|
|
-webkit-transform: translateY(-20px);
|
|
transform: translateY(-20px);
|
|
}
|
|
100% {
|
|
-webkit-transform: translateY(0);
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
@-moz-keyframes highlight {
|
|
0% {
|
|
transform: translateY(0);
|
|
}
|
|
50% {
|
|
transform: translateY(-20px);
|
|
}
|
|
100% {
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
@-o-keyframes highlight {
|
|
0% {
|
|
-o-transform: translateY(0);
|
|
transform: translateY(0);
|
|
}
|
|
50% {
|
|
-o-transform: translateY(-20px);
|
|
transform: translateY(-20px);
|
|
}
|
|
100% {
|
|
-o-transform: translateY(0);
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
@keyframes highlight {
|
|
0% {
|
|
-webkit-transform: translateY(0);
|
|
-ms-transform: translateY(0);
|
|
-o-transform: translateY(0);
|
|
transform: translateY(0);
|
|
}
|
|
50% {
|
|
-webkit-transform: translateY(-20px);
|
|
-ms-transform: translateY(-20px);
|
|
-o-transform: translateY(-20px);
|
|
transform: translateY(-20px);
|
|
}
|
|
100% {
|
|
-webkit-transform: translateY(0);
|
|
-ms-transform: translateY(0);
|
|
-o-transform: translateY(0);
|
|
transform: translateY(0);
|
|
}
|
|
}
|