模板图的modown主题,修改插入代码的背景
修改modown的插入代码功能,使其变正常在wordpress后台,Modown主题设置,样式,最下面,自定义CSS,添加
.article-content code{background:transparent}
以及一个修改文章内网址超链接颜色的css,也是可以这里添加
/* --- Modown 主题文章链接颜色修改开始(修正版:排除点赞/分享模块)--- */
/* 1. 设置文章主体内容区域链接的颜色和样式 */
/* 目标:文章内的超链接 */
.article-content a,
.entry-content a,
.single-content a {
color: #1e73be !important; /* 链接颜色:蓝色 */
text-decoration: none; /* 移除下划线 */
}
/* 2. 鼠标悬停时的颜色(深蓝) */
.article-content a:hover,
.entry-content a:hover,
.single-content a:hover {
color: #0056b3 !important;
text-decoration: underline;
}
/* 3. 排除按钮或特定元素(防止把下载按钮也变色) */
.article-content .btn,
.article-content .button {
color: #fff !important; /* 按钮文字颜色:白色 */
text-decoration: none;
}
/* 4. 【重点修正】重置“点赞、收藏、分享”等模块内链接的颜色和样式 */
/* - 包含常见的文章元信息/交互模块类名(如 .post-meta, .entry-footer, .share-box 等)。
- 使用 'inherit' 属性将颜色恢复为主题为这些模块设定的默认颜色。
*/
.article-content .post-meta a,
.article-content .entry-footer a,
.article-content .post-actions a,
.article-content .post-love a,
.article-content .share-box a
{
color: inherit !important; /* 恢复为父级元素的默认颜色 */
text-decoration: none !important;
}
/* 5. 【重点修正】重置上述模块内链接的鼠标悬停颜色 */
.article-content .post-meta a:hover,
.article-content .entry-footer a:hover,
.article-content .post-actions a:hover,
.article-content .post-love a:hover,
.article-content .share-box a:hover
{
color: inherit !important; /* 恢复为父级元素的默认悬停颜色 */
/* 如果原主题的悬停有下划线,可以改为 text-decoration: underline !important; */
text-decoration: none !important;
}
/* --- Modown 主题文章链接颜色修改结束 --- */
页:
[1]