-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcounter.css
More file actions
84 lines (74 loc) · 2.63 KB
/
counter.css
File metadata and controls
84 lines (74 loc) · 2.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/* Reset some default styles and set up consistent base styles across all elements */
* {
margin: 0; /* Remove default margin */
padding: 0; /* Remove default padding */
box-sizing: border-box; /* Include padding and border in element's total width/height */
font-family: 'Poppins', sans-serif; /* Set default font */
text-decoration: none; /* Remove underlines from links */
list-style: none; /* Remove bullet points from lists */
}
/* Style the body of the document */
body {
background-color: rgb(102,87,4); /* Set dark yellow-brown background */
color: white; /* Default text color */
align-items: center; /* Center items vertically */
height: 100vh; /* Full viewport height */
margin: 0; /* Remove default margin */
display: flex; /* Enable flexbox */
font-family: Arial, Helvetica, sans-serif; /* Override font for fallback */
justify-content: center; /* Center items horizontally */
}
/* Main container for the counter app */
.counter-app {
text-align: center; /* Center text inside the container */
background-color: #fff; /* White background */
padding: 50px; /* Inner spacing */
border-radius: 8px; /* Rounded corners */
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
}
/* Header (h1) styling */
h1 {
font-size: 24px; /* Set heading size */
margin-bottom: 20px; /* Space below heading */
color: #333; /* Dark text color */
}
/* Styling for the counter number display */
#counter-value {
font-size: 48px; /* Large text for visibility */
color: #333; /* Dark gray color */
margin: 20px 0; /* Vertical spacing above and below */
}
/* Container for the buttons */
.button-group {
display: flex; /* Arrange buttons in a row */
gap: 10px; /* Space between buttons */
}
/* General styling for all buttons */
button {
padding: 10px 20px; /* Padding inside button */
font-size: 16px; /* Button text size */
border: none; /* Remove border */
border-radius: 5px; /* Slightly rounded corners */
cursor: pointer; /* Pointer cursor on hover */
transition: background-color 0.3s; /* Smooth hover transition */
}
/* Increase button style (green) */
#increase-btn {
background-color: #28a745; /* Bootstrap-style success green */
color: white;
}
/* Decrease button style (yellow) */
#decrease-btn {
background-color: #ffc107; /* Bootstrap-style warning yellow */
color: white;
}
/* Reset button style (red) */
#reset-btn {
background-color: #dc3545; /* Bootstrap-style danger red */
color: white;
}
/* Hover effect for all buttons */
button:hover {
opacity: 0.9; /* Slight fade effect on hover */
}
Counter css