style(NewsDetail): 为富文本视频添加响应式样式
确保新闻详情页中的视频元素能够自适应容器宽度,保持正确的宽高比,并添加垂直外边距以改善视觉间距。
Showing
1 changed file
with
8 additions
and
0 deletions
| ... | @@ -200,6 +200,14 @@ onMounted(async () => { | ... | @@ -200,6 +200,14 @@ onMounted(async () => { |
| 200 | margin: 0.5rem auto; | 200 | margin: 0.5rem auto; |
| 201 | } | 201 | } |
| 202 | 202 | ||
| 203 | +/* 富文本视频样式 */ | ||
| 204 | +.content-text :deep(video) { | ||
| 205 | + max-width: 100%; | ||
| 206 | + height: auto; | ||
| 207 | + display: block; | ||
| 208 | + margin: 0.5rem auto; | ||
| 209 | +} | ||
| 210 | + | ||
| 203 | /* 错误状态样式 */ | 211 | /* 错误状态样式 */ |
| 204 | .error-container { | 212 | .error-container { |
| 205 | background-color: #F2EBDB; | 213 | background-color: #F2EBDB; | ... | ... |
-
Please register or login to post a comment