App.css
css3 kB212 linesIn Examples.zip
Examples.zipChapter15-CustomHookssrcApp.css
.App {
min-height: 100vh;
background: #f5f7fa;
}
.header {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 40px 20px;
text-align: center;
}
.content {
max-width: 1400px;
margin: 0 auto;
padding: 40px 20px;
}
.info-banner {
background: white;
padding: 25px;
border-radius: 10px;
margin-bottom: 30px;
border-left: 5px solid #667eea;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.info-banner h2 {
color: #667eea;
margin-top: 0;
}
.examples-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
gap: 25px;
margin-bottom: 30px;
}
.demo-box {
background: white;
padding: 25px;
border-radius: 10px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.demo-box h3 {
margin: 0 0 15px 0;
color: #333;
border-bottom: 2px solid #667eea;
padding-bottom: 10px;
}
.result-box,
.content-box {
padding: 15px;
background: #f9f9f9;
border-radius: 5px;
margin: 15px 0;
}
.info-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 10px;
padding: 15px;
background: #f9f9f9;
border-radius: 5px;
margin: 15px 0;
}
.counter-display {
font-size: 3em;
font-weight: bold;
color: #667eea;
text-align: center;
margin: 20px 0;
}
.button-group {
display: flex;
gap: 10px;
flex-wrap: wrap;
justify-content: center;
}
.status {
padding: 15px;
border-radius: 5px;
text-align: center;
font-weight: bold;
margin: 15px 0;
}
.status.online {
background: #d4edda;
color: #155724;
border: 2px solid #28a745;
}
.status.offline {
background: #f8d7da;
color: #721c24;
border: 2px solid #dc3545;
}
.array-controls {
display: flex;
gap: 10px;
margin: 15px 0;
}
.array-list {
list-style: none;
padding: 0;
}
.array-list li {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px;
margin: 5px 0;
background: #f9f9f9;
border-radius: 5px;
}
.array-list button {
background: #dc3545;
padding: 5px 10px;
font-size: 0.9em;
}
input {
flex: 1;
padding: 10px;
border: 2px solid #ddd;
border-radius: 5px;
font-size: 16px;
}
input:focus {
outline: none;
border-color: #667eea;
}
button {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
border: none;
padding: 10px 20px;
border-radius: 5px;
cursor: pointer;
font-weight: 500;
transition: transform 0.2s;
}
button:hover {
transform: scale(1.05);
}
.note {
color: #666;
font-style: italic;
font-size: 0.9em;
margin-top: 10px;
}
.tips-box,
.benefits-box {
background: white;
padding: 25px;
border-radius: 10px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
margin-bottom: 30px;
}
.tips-box {
border-left: 5px solid #28a745;
}
.tips-box h3 {
margin-top: 0;
color: #28a745;
}
.benefits-box {
border-left: 5px solid #ffc107;
}
.benefits-box h3 {
margin-top: 0;
color: #f57c00;
}
.tips-box ul,
.benefits-box ul {
line-height: 2;
}