Просмотр исходного кода

限制新闻网正文图片宽度

新闻红模板正文图片统一设置 max-width:100%!important 和 height:auto!important,覆盖编辑器内联固定宽高,防止正文图片超出内容框。

Validation: hxcs 抽样正文原图宽 4080/4096/4284px,修复后均限制在 1130px 内容框内。
非繁 2 месяцев назад
Родитель
Сommit
913f6ecf30

+ 4 - 0
WebRoot/main/ffkj-portal/news-red.css

@@ -384,3 +384,7 @@ body.screen-list-page .footer-top{margin-top:auto}
 
 #campus .feature-caption h3,
 .section-title h2{font-weight:400}
+
+/* 正文图片不得超出内容框,兼容编辑器内联固定宽高 */
+.article-detail-body img,
+.article-detail-body .ck-content img{max-width:100%!important;height:auto!important}

+ 1 - 1
WebRoot/web/upload/ffkj-template/news-red-catalog.jsp

@@ -10,7 +10,7 @@
 	<meta charset="UTF-8">
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<title>${navigation.name}_${website.seoTitle}</title>
-	<link rel="stylesheet" href="/main/ffkj-portal/news-red.css?v=20260921-news-red-title-weight">
+	<link rel="stylesheet" href="/main/ffkj-portal/news-red.css?v=20260921-news-red-body-media-fit">
 </head>
 <body class="screen-red-theme screen-list-page">
 	<%@ include file="news-red-header.jsp"%>

+ 1 - 1
WebRoot/web/upload/ffkj-template/news-red-details.jsp

@@ -7,7 +7,7 @@
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<meta name="description" content="${articleDescription}">
 	<title>${articleTitle}_${navigation.name}_${website.seoTitle}</title>
-	<link rel="stylesheet" href="/main/ffkj-portal/news-red.css?v=20260921-news-red-title-weight">
+	<link rel="stylesheet" href="/main/ffkj-portal/news-red.css?v=20260921-news-red-body-media-fit">
 </head>
 <body class="screen-red-theme">
 	<%@ include file="news-red-header.jsp"%>

+ 1 - 1
WebRoot/web/upload/ffkj-template/news-red-index.jsp

@@ -12,7 +12,7 @@
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<title>${website.seoTitle}</title>
 	<meta name="description" content="${website.seoDescription}">
-	<link rel="stylesheet" href="/main/ffkj-portal/news-red.css?v=20260921-news-red-title-weight">
+	<link rel="stylesheet" href="/main/ffkj-portal/news-red.css?v=20260921-news-red-body-media-fit">
 </head>
 <body class="screen-red-theme">
 	<%@ include file="news-red-header.jsp"%>

+ 1 - 1
WebRoot/web/upload/ffkj-template/news-red-list.jsp

@@ -17,7 +17,7 @@
 	<meta charset="UTF-8">
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<title>${navigation.name}_${website.seoTitle}</title>
-	<link rel="stylesheet" href="/main/ffkj-portal/news-red.css?v=20260921-news-red-title-weight">
+	<link rel="stylesheet" href="/main/ffkj-portal/news-red.css?v=20260921-news-red-body-media-fit">
 </head>
 <body class="screen-red-theme screen-list-page">
 	<%@ include file="news-red-header.jsp"%>

+ 1 - 1
WebRoot/web/upload/ffkj-template/news-red-search.jsp

@@ -8,7 +8,7 @@
 	<meta charset="UTF-8">
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<title>站内搜索_${website.seoTitle}</title>
-	<link rel="stylesheet" href="/main/ffkj-portal/news-red.css?v=20260921-news-red-title-weight">
+	<link rel="stylesheet" href="/main/ffkj-portal/news-red.css?v=20260921-news-red-body-media-fit">
 </head>
 <body class="screen-red-theme">
 	<%@ include file="news-red-header.jsp"%>