Yolov/templates/demo/css/style.css

259 lines
4.5 KiB
CSS

/* 全局样式 */
body {
background-color: #f8f9fa;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
/* 卡片样式 */
.card {
border-radius: 10px;
transition: transform 0.3s, box-shadow 0.3s;
}
.card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}
/* 统计卡片 */
.stat-card {
border-radius: 8px;
background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
border: 1px solid #dee2e6;
}
/* 功能图标 */
.feature-icon {
width: 70px;
height: 70px;
border-radius: 50%;
background-color: rgba(13, 110, 253, 0.1);
display: flex;
align-items: center;
justify-content: center;
margin: 0 auto 1rem;
}
/* 图标圆圈 */
.icon-circle {
width: 50px;
height: 50px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
}
/* 导航栏活动状态指示 */
.nav-link.active {
font-weight: 600;
position: relative;
}
.nav-link.active::after {
content: '';
position: absolute;
bottom: -5px;
left: 50%;
transform: translateX(-50%);
width: 20px;
height: 3px;
background-color: #0d6efd;
border-radius: 2px;
}
/* 表格样式 */
.table-hover tbody tr:hover {
background-color: rgba(13, 110, 253, 0.05);
}
/* 视频播放器样式 */
.video-placeholder {
width: 100%;
height: 500px;
background: linear-gradient(135deg, #2c3e50 0%, #4a6491 100%);
display: flex;
align-items: center;
justify-content: center;
border-radius: 10px 10px 0 0;
}
.placeholder-content {
text-align: center;
color: white;
}
.placeholder-content i {
color: rgba(255, 255, 255, 0.7);
}
.simulated-video {
width: 100%;
height: 500px;
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
position: relative;
overflow: hidden;
border-radius: 10px 10px 0 0;
}
.video-header {
position: absolute;
top: 15px;
left: 15px;
z-index: 10;
}
.detection-box {
position: absolute;
border: 2px solid #0d6efd;
border-radius: 4px;
animation: pulse 2s infinite;
}
.detection-box::before {
content: '';
position: absolute;
top: -2px;
left: -2px;
right: -2px;
bottom: -2px;
border: 1px solid rgba(255, 255, 255, 0.5);
border-radius: 4px;
animation: pulse-border 2s infinite;
}
.box-label {
position: absolute;
top: -25px;
left: -2px;
background-color: #0d6efd;
color: white;
padding: 2px 8px;
border-radius: 4px;
font-size: 12px;
white-space: nowrap;
}
.video-info {
position: absolute;
bottom: 60px;
left: 15px;
display: flex;
gap: 15px;
z-index: 10;
}
.info-item {
display: flex;
align-items: center;
gap: 5px;
color: white;
font-size: 14px;
background-color: rgba(0, 0, 0, 0.5);
padding: 5px 10px;
border-radius: 4px;
}
.fps-display {
position: absolute;
top: 15px;
right: 15px;
background-color: rgba(0, 0, 0, 0.5);
color: white;
padding: 5px 10px;
border-radius: 4px;
font-size: 14px;
z-index: 10;
}
.video-controls {
position: absolute;
bottom: 0;
left: 0;
right: 0;
z-index: 20;
}
.controls-bg {
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 60px;
background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
}
.controls-content {
position: relative;
padding: 15px;
}
/* 动画 */
@keyframes pulse {
0% {
box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.7);
}
70% {
box-shadow: 0 0 0 10px rgba(13, 110, 253, 0);
}
100% {
box-shadow: 0 0 0 0 rgba(13, 110, 253, 0);
}
}
@keyframes pulse-border {
0% {
opacity: 1;
}
50% {
opacity: 0.5;
}
100% {
opacity: 1;
}
}
/* 流列表项 */
.list-group-item.active {
background-color: rgba(13, 110, 253, 0.1);
border-color: rgba(13, 110, 253, 0.2);
color: #0d6efd;
}
/* 按钮样式 */
.btn {
border-radius: 6px;
font-weight: 500;
}
.btn-lg {
padding: 0.75rem 1.5rem;
}
/* 页脚样式 */
footer {
margin-top: auto;
}
/* 响应式调整 */
@media (max-width: 768px) {
.video-placeholder,
.simulated-video {
height: 300px;
}
.video-info {
flex-direction: column;
gap: 5px;
}
.feature-icon {
width: 50px;
height: 50px;
}
.icon-circle {
width: 40px;
height: 40px;
}
}