Files
disk-scheduling/styles.css
T
2024-11-27 11:39:01 +08:00

164 lines
3.0 KiB
CSS

body {
font-family: "Segoe UI", system-ui, sans-serif;
max-width: 1200px;
margin: 0 auto;
padding: 20px;
background-color: #f8f9fa;
color: #212529;
}
h1 {
text-align: center;
margin-bottom: 2rem;
}
.container {
background-color: white;
padding: 2rem;
border-radius: 12px;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
.disk-track {
position: relative;
width: 100%;
height: 80px;
background: linear-gradient(to right, #e9ecef, #dee2e6);
border-radius: 8px;
margin: 2rem 0;
}
.head {
position: absolute;
width: 20px;
height: 50px;
background: linear-gradient(45deg, #ff4d4d, #ff6b6b);
border-radius: 6px;
top: 15px;
transform: translateX(-50%);
transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: 0 2px 8px rgba(255, 77, 77, 0.3);
}
.request {
position: absolute;
width: 12px;
height: 12px;
background-color: #339af0;
border-radius: 50%;
top: 34px;
transform: translateX(-50%);
transition: background-color 0.3s ease;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.served {
background-color: #51cf66;
transform: translateX(-50%) scale(1.2);
}
.controls {
background-color: #f8f9fa;
padding: 1.5rem;
border-radius: 8px;
border: 1px solid #dee2e6;
}
.input-row {
display: grid;
grid-template-columns: auto 1fr;
gap: 1rem;
margin-bottom: 1rem;
}
.buttons-row {
display: flex;
flex-wrap: wrap;
gap: 12px;
align-items: center;
}
button {
padding: 10px 20px;
background: linear-gradient(45deg, #339af0, #228be6);
color: white;
border: none;
border-radius: 6px;
cursor: pointer;
font-weight: 500;
transition: transform 0.2s, box-shadow 0.2s;
}
button:disabled {
opacity: 0.6;
cursor: not-allowed;
transform: none;
box-shadow: none;
}
button.active {
background: linear-gradient(45deg, #40c057, #37b24d);
box-shadow: 0 4px 12px rgba(55, 178, 77, 0.2);
}
button:hover {
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(34, 139, 230, 0.2);
}
input,
select {
padding: 8px 12px;
border: 1px solid #dee2e6;
border-radius: 6px;
font-size: 14px;
transition: border-color 0.2s;
}
input:focus,
select:focus {
outline: none;
border-color: #339af0;
box-shadow: 0 0 0 3px rgba(51, 154, 240, 0.1);
}
#stats {
margin-top: 1.5rem;
padding: 1.5rem;
background-color: #f8f9fa;
border-radius: 8px;
border: 1px solid #dee2e6;
}
.stat-item {
display: flex;
justify-content: space-between;
margin-bottom: 0.5rem;
}
.stat-value {
font-weight: 600;
color: #339af0;
}
@keyframes pulse {
0% {
transform: translateX(-50%) scale(1);
}
50% {
transform: translateX(-50%) scale(1.3);
}
100% {
transform: translateX(-50%) scale(1.2);
}
}
.copyright {
margin-top: 20px;
text-align: center;
color: #666;
font-size: 0.9em;
}