优化公告详情页布局,移除最大宽度限制
- 移除 max-width: 900px 限制,使用全宽布局 - 添加内容自动换行支持 - 优化图片和表格的响应式显示 - 与列表页保持一致的视觉宽度 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -103,8 +103,6 @@ function getCategoryLabel(category: string) {
|
|||||||
.announcement-detail-page {
|
.announcement-detail-page {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 20px;
|
gap: 20px;
|
||||||
max-width: 900px;
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.detail-header {
|
.detail-header {
|
||||||
@@ -190,9 +188,12 @@ function getCategoryLabel(category: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.detail-content {
|
.detail-content {
|
||||||
|
max-width: 100%;
|
||||||
color: #334155;
|
color: #334155;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
line-height: 1.8;
|
line-height: 1.8;
|
||||||
|
word-wrap: break-word;
|
||||||
|
overflow-wrap: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
.detail-content :deep(h1),
|
.detail-content :deep(h1),
|
||||||
@@ -279,10 +280,32 @@ function getCategoryLabel(category: string) {
|
|||||||
|
|
||||||
.detail-content :deep(img) {
|
.detail-content :deep(img) {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
|
height: auto;
|
||||||
margin: 20px 0;
|
margin: 20px 0;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.detail-content :deep(table) {
|
||||||
|
width: 100%;
|
||||||
|
max-width: 100%;
|
||||||
|
border-collapse: collapse;
|
||||||
|
margin: 20px 0;
|
||||||
|
overflow-x: auto;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-content :deep(table th),
|
||||||
|
.detail-content :deep(table td) {
|
||||||
|
padding: 12px;
|
||||||
|
border: 1px solid #e6eaf2;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-content :deep(table th) {
|
||||||
|
background: #f8fafc;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
@media (max-width: 720px) {
|
@media (max-width: 720px) {
|
||||||
.announcement-detail-card {
|
.announcement-detail-card {
|
||||||
padding: 24px 20px;
|
padding: 24px 20px;
|
||||||
|
|||||||
Reference in New Issue
Block a user