add meta charset tag in index.html; fix opacity calculation in fade-in effect; clean up style.css

This commit is contained in:
vista-man
2025-01-25 22:15:34 +01:00
parent 90b39f241f
commit edeca369c3
3 changed files with 3 additions and 6 deletions

View File

@@ -3,6 +3,8 @@
<head>
<!-- The title of the webpage -->
<title>My Simple Wikipedia</title>
<!-- Meta tag for character encoding -->
<meta charset="UTF-8">
<!-- Link to the external CSS file for styling -->
<link rel="stylesheet" href="style.css">
</head>

View File

@@ -10,7 +10,7 @@ window.onload = function() {
const fadeIn = () => {
let opacity = 0;
const increaseOpacity = () => {
opacity += 0.05;
opacity = parseFloat(opacity) + 0.05;
article.style.opacity = opacity;
// Continue the animation until opacity reaches 1 (fully visible)

View File

@@ -32,11 +32,6 @@ h2 {
padding-bottom: 5px; /* Add padding below the heading */
}
h1, h2 {
background-image: none; /* Remove background image */
color: #007bff; /* Set text color */
}
p {
color: #555; /* Set text color */
line-height: 1.6; /* Set line height */