/* 图片预览层样式 */
|
.img-preview {
|
display: none;
|
position: fixed;
|
top: 0;
|
left: 0;
|
width: 100%;
|
height: 100%;
|
background-color: rgba(0, 0, 0, 0.9);
|
z-index: 1000;
|
justify-content: center;
|
align-items: center;
|
}
|
|
.preview-content {
|
max-width: 90%;
|
max-height: 90%;
|
position: relative;
|
}
|
|
.preview-img {
|
max-width: 100%;
|
max-height: 90vh;
|
border-radius: 4px;
|
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
|
}
|
|
.close-preview {
|
position: absolute;
|
top: -40px;
|
right: -10px;
|
color: white;
|
font-size: 2rem;
|
cursor: pointer;
|
background: rgba(0, 0, 0, 0.5);
|
width: 40px;
|
height: 40px;
|
border-radius: 50%;
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
transition: all 0.3s ease;
|
}
|
|
.close-preview:hover {
|
background: rgba(255, 255, 255, 0.2);
|
transform: scale(1.1);
|
}
|
|
/* 图片网格样式 */
|
.gallery-grid {
|
display: grid;
|
grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
|
gap: 20px;
|
margin-bottom: 5px;
|
}
|
|
.gallery-item {
|
background: white;
|
border-radius: 8px;
|
overflow: hidden;
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
|
transition: all 0.3s ease;
|
}
|
|
.gallery-item:hover {
|
transform: translateY(-5px);
|
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
|
}
|
|
.gallery-img {
|
width: 100%;
|
height: 240px;
|
object-fit: cover;
|
cursor: pointer;
|
transition: all 0.3s ease;
|
}
|
|
.gallery-img:hover {
|
opacity: 0.95;
|
}
|
|
.gallery-info {
|
padding: 15px;
|
}
|
|
.gallery-header {
|
display: flex;
|
justify-content: space-between;
|
align-items: center;
|
margin-bottom: 10px;
|
}
|
|
.gallery-title {
|
font-size: 1.5rem;
|
font-weight: 600;
|
color: #333;
|
margin: 0;
|
flex: 1;
|
white-space: nowrap;
|
overflow: hidden;
|
text-overflow: ellipsis;
|
}
|
|
.gallery-meta {
|
display: flex;
|
flex-direction: column;
|
gap: 2px;
|
}
|
|
.meta-item {
|
display: flex;
|
align-items: center;
|
font-size: 1.3rem;
|
color: #666;
|
}
|
|
.meta-item i {
|
width: 16px;
|
margin-right: 6px;
|
color: #999;
|
font-size: 1.25rem;
|
}
|
|
.gallery-filename i {
|
margin-right: 5px;
|
font-size: 0.7rem;
|
}
|
|
/* 标签样式 */
|
.gallery-tags {
|
display: flex;
|
flex-wrap: wrap;
|
margin-left: auto;
|
gap: 3px;
|
/*margin: 12px 0;*/
|
}
|
|
|
/* 分页样式 */
|
.pagination-container {
|
display: flex;
|
justify-content: flex-end;
|
width: 100%;
|
/*margin-top: 40px;*/
|
}
|
|
/* 空状态样式 */
|
.empty-state {
|
grid-column: 1 / -1;
|
text-align: center;
|
padding: 60px 20px;
|
color: #999;
|
}
|
|
.empty-state i {
|
font-size: 4rem;
|
margin-bottom: 20px;
|
color: #ddd;
|
}
|
|
.empty-state h3 {
|
font-size: 1.5rem;
|
margin-bottom: 10px;
|
color: #666;
|
}
|
|
/* 响应式设计 */
|
@media (max-width: 992px) {
|
.gallery-grid {
|
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
gap: 25px;
|
}
|
}
|
|
@media (max-width: 768px) {
|
|
|
.main-nav li {
|
margin: 0 10px;
|
}
|
|
.gallery-grid {
|
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
|
gap: 20px;
|
}
|
|
.gallery-img {
|
height: 180px;
|
}
|
|
}
|
|
@media (max-width: 576px) {
|
.gallery-grid {
|
grid-template-columns: 1fr;
|
}
|
|
.gallery-img {
|
height: 200px;
|
}
|
|
}
|