繁体   English   中英

如何为我的Wordpress网站的其余epsilon设置主题?

[英]How can I theme the remaining epsilon of my Wordpress site?

我正在一个Wordpress网站上工作,目前在http://dev.cjshayward.com上 ,其子主题为26。 目前,我唯一的自定义设置是style.css,尽管我想编辑一下,例如404页面,其中包括https://cjshayward.com/missing.html的有趣部分。 我现在最感兴趣的两个更改是在术语的最佳意义上是可用的和无聊的:未访问页面的带下划线的蓝色链接和已访问页面的带下划线的紫色,没有小于默认字体大小的文本。

我的更改影响了大多数文本,但除非将鼠标悬停在徽标上,否则左上角的徽标链接“ CJS Hayward”为黑色,并且某些内部链接的阴影为蓝色(与复制位置,复制位置不同)是默认颜色)。 我尝试从Chrome的调试器中检查有问题的元素,然后Chrome将我的替代显示为活动状态,并且(在!important的帮助下)将相反的颜色和尺寸设置为非活动状态,但是这些保留看上去像是普通的旧的未减弱的26。

我的子主题style.css是:

/*
 Theme Name:   Twenty Sixteen UX Tweaks Child
 Theme URI:    https://cjshayward.com/twenty-sixteen-ux-tweaks-child/
 Description:  Twenty Sixteen UX Tweaks Child Theme
 Author:       CJS Hayward
 Author URI:   https://cjshayward.com
 Template:     twentysixteen
 Version:      1.0.0
 License:      MIT
 License URI:  https://opensource.org/licenses/MIT
 Tags:         ux, usability, light, dark, two-columns, right-sidebar,          responsive-layout, accessibility-ready
 Text Domain:  twenty-sixteen-ux-tweaks-child
*/
a
    {
    text-decoration: underline;
    }
a:alink, a:active, .site-branding .site-title a:active
    {
    color: #800000;
    }
a:link, .site-branding .site-title a:link
    {
    color: #0000ee !important;
    } 
a:vlink, a:visited, .site-branding .site-title a:link
    {
    color: #551a8b !important;
    }    
body, button, .entry-footer, input, select, .site-title, textarea, .widget,
.widget-title, h2.widget, h2.widget-title
    {    
    font-family: Verdana, Arial, sans !important;
    font-size: 20px !important;
    }

如何获得顶部的“ CJS Hayward”链接以及右栏中的小部件h2,以分别根据在子style.css中定义的规则进行着色和设置大小?

如果我对您的理解正确,那么您希望所有链接(包括.site-branding)均为蓝色,例如,所有访问的链接均为红色。

如果是这样,您的css规则必须是:

body, button, .entry-footer, input, select, .site-title, textarea, .widget, .widget-title, h2.widget, h2.widget-title
{    
    font-family: Verdana, Arial, sans !important;
    font-size: 20px !important;
}
a, a:link {
    text-decoration: underline;
    color: blue;
}
a:visited {
    color: red;
}
a:hover {
    //color for cover;
}
a:active {
    color: #800000
}

根据w3schools ,必须按此顺序定义链接状态

如果您想以其他方式设置徽标样式,则可以使用.site-branding .site-title a

如果要设置徽标和小部件标题的样式,请将其添加到孩子的style.css中

.site-branding .site-title a,
.widget .widget-title {
   background: #0000ee;
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM