js flex
This commit is contained in:
parent
8692972a60
commit
df874571b4
@ -6,7 +6,9 @@
|
||||
<link rel="stylesheet" type="text/css" href="styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<canvas id="game" width="768" height="1366"></canvas>
|
||||
<div class="wrap">
|
||||
<canvas id="game" width="768" height="1366"></canvas>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src="game.js"></script>
|
||||
</body>
|
||||
|
@ -1,10 +1,20 @@
|
||||
html { height: 100%; }
|
||||
|
||||
body {
|
||||
background-color: #101024;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
div.wrap {
|
||||
display: flex;
|
||||
height: 100%;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
canvas#game {
|
||||
margin: 0 auto;
|
||||
border: 2px solid #ec8a4b;
|
||||
display: block;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user