style(NewsDetail): 添加富文本图片样式
- 图片最大宽度100%,自适应高度 - 图片居中显示,上下间距0.5rem Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Showing
1 changed file
with
8 additions
and
0 deletions
| ... | @@ -192,6 +192,14 @@ onMounted(async () => { | ... | @@ -192,6 +192,14 @@ onMounted(async () => { |
| 192 | margin-bottom: 0; | 192 | margin-bottom: 0; |
| 193 | } | 193 | } |
| 194 | 194 | ||
| 195 | +/* 富文本图片样式 */ | ||
| 196 | +.content-text :deep(img) { | ||
| 197 | + max-width: 100%; | ||
| 198 | + height: auto; | ||
| 199 | + display: block; | ||
| 200 | + margin: 0.5rem auto; | ||
| 201 | +} | ||
| 202 | + | ||
| 195 | /* 错误状态样式 */ | 203 | /* 错误状态样式 */ |
| 196 | .error-container { | 204 | .error-container { |
| 197 | background-color: #F2EBDB; | 205 | background-color: #F2EBDB; | ... | ... |
-
Please register or login to post a comment