Changed styling

This commit is contained in:
Henry Hiles 2022-02-28 10:06:29 -05:00
parent bb3a048d15
commit 00b9bca8bb
5 changed files with 45 additions and 45 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7 KiB

BIN
images/flappyComputer1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

BIN
images/pipe.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

View file

@ -1,75 +1,75 @@
*, *,
*::after, *::after,
*::before { *::before {
box-sizing: border-box; box-sizing: border-box;
} }
body { body {
margin: 0; margin: 0;
background-image: url(images/background.png); background-image: url(images/background.png);
background-size: cover; background-size: cover;
height: 100vh; height: 100vh;
font-family: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, font-family: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
"Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji",
"Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
overflow: hidden; overflow: hidden;
} }
.title { .title {
z-index: 10; z-index: 10;
position: absolute; position: absolute;
display: flex; display: flex;
text-align: center; text-align: center;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
inset: 0; inset: 0;
color: #eff2f5; color: #eff2f5;
margin: 0; margin: 0;
flex-direction: column; flex-direction: column;
background-color: rgba(0, 0, 0, 0.2); background-color: rgba(0, 0, 0, 0.2);
} }
.subtitle { .subtitle {
margin-top: 0.5rem; margin-top: 0.5rem;
} }
.hide { .hide {
display: none; display: none;
} }
.bird { .bird {
--bird-top: -1000; --bird-top: -1000;
--bird-size: 60px; --bird-size: 60px;
user-select: none; user-select: none;
position: absolute; position: absolute;
width: var(--bird-size); width: var(--bird-size);
left: var(--bird-size); left: var(--bird-size);
top: calc(var(--bird-top) * 1px); top: calc(var(--bird-top) * 1px);
border-radius: 50%; border-radius: 50%;
} }
.pipe { .pipe {
position: absolute; position: absolute;
top: 0; top: 0;
bottom: 0; bottom: 0;
width: calc(var(--pipe-width) * 1px); width: calc(var(--pipe-width) * 1px);
left: calc(var(--pipe-left) * 1px); left: calc(var(--pipe-left) * 1px);
} }
.pipe > .segment { .pipe > .segment {
position: absolute; position: absolute;
width: 100%; width: 100%;
background-size: 100% 600px; background-size: 100% 1200px;
} }
.pipe > .top { .pipe > .top {
top: 0; top: 0;
bottom: calc(var(--hole-top) * 1px); bottom: calc(var(--hole-top) * 1px);
background-image: url(images/topPipe.png); background-image: url(images/pipe.png);
background-position: bottom; transform: scaleY(-1);
} }
.pipe > .bottom { .pipe > .bottom {
bottom: 0; bottom: 0;
top: calc(100vh - (var(--hole-top) * 1px) + calc(var(--hole-height) * 1px)); top: calc(100vh - (var(--hole-top) * 1px) + calc(var(--hole-height) * 1px));
background-image: url(images/bottomPipe.png); background-image: url(images/pipe.png);
} }