/* pages/news/detail.wxss */
|
.container {
|
min-height: 100vh;
|
background-color: #f5f5f5;
|
}
|
|
.loading-wrapper {
|
display: flex;
|
flex-direction: column;
|
align-items: center;
|
padding: 100rpx 0;
|
}
|
|
.loading {
|
width: 40rpx;
|
height: 40rpx;
|
border: 4rpx solid #f3f3f3;
|
border-top: 4rpx solid #007aff;
|
border-radius: 50%;
|
animation: spin 1s linear infinite;
|
margin-bottom: 20rpx;
|
}
|
|
@keyframes spin {
|
0% { transform: rotate(0deg); }
|
100% { transform: rotate(360deg); }
|
}
|
|
.loading-text {
|
font-size: 28rpx;
|
color: #999;
|
}
|
|
.news-detail {
|
padding: 20rpx;
|
}
|
|
.news-header {
|
background: white;
|
border-radius: 16rpx;
|
padding: 30rpx;
|
margin-bottom: 20rpx;
|
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.1);
|
}
|
|
.news-title {
|
font-size: 36rpx;
|
font-weight: 600;
|
color: #333;
|
line-height: 1.4;
|
margin-bottom: 20rpx;
|
word-wrap: break-word;
|
overflow-wrap: break-word;
|
}
|
|
.news-meta {
|
display: flex;
|
flex-wrap: wrap;
|
align-items: center;
|
gap: 12rpx;
|
margin-bottom: 16rpx;
|
}
|
|
.author {
|
font-size: 26rpx;
|
color: #666;
|
}
|
|
.separator {
|
font-size: 26rpx;
|
color: #ddd;
|
}
|
|
.time {
|
font-size: 26rpx;
|
color: #999;
|
}
|
|
.update-time {
|
font-size: 24rpx;
|
color: #999;
|
}
|
|
.news-cover {
|
background: white;
|
border-radius: 16rpx;
|
overflow: hidden;
|
margin-bottom: 20rpx;
|
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.1);
|
}
|
|
.cover-image {
|
width: 100%;
|
display: block;
|
}
|
|
.news-content {
|
background: white;
|
border-radius: 16rpx;
|
padding: 30rpx;
|
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.1);
|
word-wrap: break-word;
|
overflow-wrap: break-word;
|
max-width: 100%;
|
}
|
|
.news-content rich-text {
|
font-size: 30rpx;
|
line-height: 1.6;
|
color: #333;
|
word-wrap: break-word;
|
overflow-wrap: break-word;
|
max-width: 100%;
|
display: block;
|
}
|
|
/* 富文本内容样式 */
|
.news-content rich-text image,
|
.news-content rich-text img {
|
max-width: 100% !important;
|
width: auto !important;
|
height: auto !important;
|
border-radius: 12rpx;
|
margin: 20rpx 0;
|
display: block !important;
|
box-sizing: border-box;
|
}
|
|
.news-content rich-text p {
|
margin: 0 0 20rpx 0;
|
line-height: 1.6;
|
word-wrap: break-word;
|
overflow-wrap: break-word;
|
max-width: 100%;
|
}
|
|
/* 确保所有富文本元素都不会超出容器 */
|
.news-content rich-text view,
|
.news-content rich-text div,
|
.news-content rich-text span {
|
max-width: 100% !important;
|
word-wrap: break-word;
|
overflow-wrap: break-word;
|
box-sizing: border-box;
|
}
|
|
/* 特别处理表格 */
|
.news-content rich-text table {
|
max-width: 100% !important;
|
overflow-x: auto;
|
display: block;
|
box-sizing: border-box;
|
}
|
|
.news-content rich-text td,
|
.news-content rich-text th {
|
word-wrap: break-word;
|
overflow-wrap: break-word;
|
max-width: 100%;
|
box-sizing: border-box;
|
}
|
|
/* 处理可能的内联样式 */
|
.news-content rich-text image[style*="width"],
|
.news-content rich-text img[style*="width"],
|
.news-content rich-text div[style*="width"],
|
.news-content rich-text p[style*="width"] {
|
max-width: 100% !important;
|
}
|