diff --git a/css.css b/css.css index 8325748..b3d9a4f 100644 --- a/css.css +++ b/css.css @@ -5,10 +5,7 @@ } -h1{ - text-align: center; - -} + #hvezda{ background-image: url("stars.jpg"); } @@ -16,4 +13,10 @@ h1{ .zeme01{ position: fixed; opacity: 0; +} +.zarovnani{ + position:absolute; + left: 50%; + top: 50%; + } \ No newline at end of file diff --git a/index.html b/index.html index 8bbbd83..9ebc946 100644 --- a/index.html +++ b/index.html @@ -14,31 +14,37 @@
- - -

Ahoj

- - +
+

Ahoj

+
+

Ahoj

+
-

Ahoj

+
+

Ahoj

+
-

afff

+
+

Ahoj

+
-

afff

+
+

Ahoj

+
@@ -55,13 +61,15 @@ if (value >= 0 && value <= 255) { document.body.style.backgroundColor = "rgb(" + value + "," + value + "," + value + ")"; } - let hvezdaa = document.querySelector('#hvezda'); + + let hvezda = document.querySelector('#hvezda'); let hvezda_rect = hvezda.getBoundingClientRect(); let opacity =(hvezda_rect.top / hvezda_rect.height); if (opacity >= 0 && opacity <= 1) { console.log("Opacity: " +opacity); document.body.style.backgroundImage = "rgb(" + opacity + "," + opacity + "," + opacity + ")"; } + let odkrytí = document.querySelector('#odkrytí'); let odkrytí_rect = odkrytí.getBoundingClientRect(); let zeme_img = document.querySelector(".zeme01");