Week 2 Day 3: Responsive web design
This commit is contained in:
51
Week-2/Day-3/style.css
Normal file
51
Week-2/Day-3/style.css
Normal file
@@ -0,0 +1,51 @@
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
header {
|
||||
background-color: #222;
|
||||
color: white;
|
||||
text-align: center;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
header:hover {
|
||||
background-color: red;
|
||||
}
|
||||
|
||||
.content {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.card {
|
||||
width: 30%;
|
||||
background-color: #eee;
|
||||
padding: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.card:hover {
|
||||
background-color: green;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.content {
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.card {
|
||||
width: 80%;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Mobile View */
|
||||
@media (max-width: 480px) {
|
||||
header h1 {
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user