我正在使用NewsCard主题,并且由于获得了免费版本,因此我使用了附加的CSS字段来自定义网站的颜色。 (通常,这只能在主题的专业版中完成)。由于我不是开发人员,所以我从教程中挑选了一个代码,选择了我的颜色,对其进行了编辑,除一件事情外,一切都变得很棒。对于手机和平板电脑版本,导航栏仍具有默认主题颜色。除了该显示器以外,在这些显示器上所有其他颜色的更改都可以。
有人可以帮我吗?我将从下面的“其他CSS”字段粘贴我的代码。
@import url('https://fonts.googleapis.com/css2?family=Piazzolla:wght@500&display=swap');
* {font-family: 'Piazzolla', serif;}
/*** Top Bar ***/
.info-bar {
background-color: ;
}
.info-bar ul li, .info-bar .social-profiles ul li a, .info-bar .infobar-links ul li a {
color: #fff;
}
/*** Nav Bar BG Color ***/
.navigation-bar {
background-color: #FF5533 !important;
}
/*** Home - Titles ***/
h3.stories-title, .stories-title {
border-left: 4px solid #FF5533;
}
/*** Home - Post Titles ***/
.post-boxed .entry-title, .post-block .entry-title, .post-boxed.main-post.inlined .entry-title {
font-weight: 500;
}
/*** Home - Widget Titles ***/
.widget-title {
border-left: 4px solid #FF5533;
}
/*** Home - Just Img ***/
.post-img-wrap .entry-meta .cat-links a {
background-color: #1e1f1e;
}
/*** Home - Img + Title ***/
.post-img-wrap + .entry-header .entry-meta .cat-links a {
background-color: #1e1f1e;
}
/*** Home - Cat Text ***/
.entry-meta .cat-links a {
color: #ef3f49;
}
/*** Home - Search Button ***/
.btn-theme {
background-color: #1e1f1e;
}
/*** Single Posts - Body & Title ***/
.entry-content p {
line-height: 1.8;
margin-bottom: 15px;
font-family: ;
font-weight:300;
color: #000;
font-size: 1em;
}
.entry-header h1.entry-title {
font-size: 35px;
font-weight: 500;
color: #333333;
margin: 0 0 10px;
font-family: 'Piazzolla', serif;
}
h1, h2, h3, h4, h5, h6 {
font-family: lato;
}
/*** Category Page Post Title***/
.entry-header h2.entry-title {
font-size: 20px;
line-height: 1.3em;
font-weight: 500;
color: #333333; }
/*** Sidebar ***/
.post-boxed.inlined .entry-title, .post-block .entry-title {
line-height: 1.2;
font-weight: 400;
font-size: 17px;
}
.post-col .entry-meta .cat-links a {
font-weight: 400;
font-size: 12px;
}
/*** Mobile Nav Bar ***/
@media (max-width: 767px) {
.navigation-bar {
background-color: #FF5533 ;
}
}
答案 0 :(得分:0)
尝试从规则中删除!important标志:
/*** Nav Bar BG Color ***/
.navigation-bar {
background-color: #FF5533;
}
否则将标记也添加到媒体查询中的规则
/*** Mobile Nav Bar ***/
@media (max-width: 767px) {
.navigation-bar {
background-color: #7799BB !important;
}
}