WordPress安装了Modown主题但是想给TAGS添加不同的颜色,该如何实现呢?
首先复制以下代码:
.widget-tags .items a:nth-child(1){background-color:#d9f2fb;color:#1aa9fb;}
.widget-tags .items a:nth-child(2){background-color:#d9fcda;color:#3ab14a;}
.widget-tags .items a:nth-child(3){background-color:#fff3d0;color:#f67c23;}
.widget-tags .items a:nth-child(4){background-color:#f8cbff;color:#a123db;}
.widget-tags .items a:nth-child(5){background-color:#bbf1f2;color:#04839d;}
.widget-tags .items a:nth-child(6){background-color:#ffdede;color:#e84f4f;}
.widget-tags .items a:nth-child(7){background-color:#d9fcda;color:#3ab14a;}
.widget-tags .items a:nth-child(8){background-color:#d9f2fb;color:#1aa9fb;}
.widget-tags .items a:nth-child(9){background-color:#ffdede;color:#e84f4f;}
.widget-tags .items a:nth-child(10){background-color:#f8cbff;color:#a123db;}
.widget-tags .items a:nth-child(11){background-color:#fff3d0;color:#f67c23;}
.widget-tags .items a:nth-child(12){background-color:#bbf1f2;color:#04839d;}
.widget-tags .items a:nth-child(13){background-color:#bbf1f2;color:#3ab14a;}
.widget-tags .items a:nth-child(14){background-color:#ffdede;color:#e84f4f;}
.widget-tags .items a:nth-child(15){background-color:#d9fcda;color:#3ab14a;}
.widget-tags .items a:nth-child(16){background-color:#d9f2fb;color:#1aa9fb;}
.widget-tags .items a:nth-child(17){background-color:#d9f2fb;color:#a123db;}
.widget-tags .items a:nth-child(18){background-color:#d9fcda;color:#04839d;}
.widget-tags .items a:nth-child(19){background-color:#f8cbff;color:#a123db;}
.widget-tags .items a:nth-child(20){background-color:#d9fcda;color:#3ab14a;}
.widget-tags .items a:nth-child(21){background-color:#bbf1f2;color:#04839d;}
.widget-tags .items a:nth-child(22){background-color:#d9fcda;color:#3ab14a;}
.widget-tags .items a:nth-child(23){background-color:#f8cbff;color:#a123db;}
.widget-tags .items a:nth-child(24){background-color:#f8cbff;color:#04839d;}
.widget-tags .items a:nth-child(25){background-color:#ffdede;color:#e84f4f;}
.widget-tags .items a:nth-child(26){background-color:#fff3d0;color:#f67c23;}
.widget-tags .items a:nth-child(27){background-color:#d9fcda;color:#04839d;}
.widget-tags .items a:nth-child(28){background-color:#d9fcda;color:#3ab14a;}
.widget-tags .items a:nth-child(29){background-color:#d9fcda;color:#1aa9fb;}
.widget-tags .items a:nth-child(30){background-color:#f8cbff;color:#a123db;}
//暗黑模式
body.night .widget-tags .items a:nth-child(1){background-color:#d9f2fb;color:#1aa9fb;}
body.night .widget-tags .items a:nth-child(2){background-color:#d9fcda;color:#3ab14a;}
body.night .widget-tags .items a:nth-child(3){background-color:#fff3d0;color:#f67c23;}
body.night .widget-tags .items a:nth-child(4){background-color:#f8cbff;color:#a123db;}
body.night .widget-tags .items a:nth-child(5){background-color:#bbf1f2;color:#04839d;}
body.night .widget-tags .items a:nth-child(6){background-color:#ffdede;color:#e84f4f;}
body.night .widget-tags .items a:nth-child(7){background-color:#d9fcda;color:#3ab14a;}
body.night .widget-tags .items a:nth-child(8){background-color:#d9f2fb;color:#1aa9fb;}
body.night .widget-tags .items a:nth-child(9){background-color:#ffdede;color:#e84f4f;}
body.night .widget-tags .items a:nth-child(10){background-color:#f8cbff;color:#a123db;}
body.night .widget-tags .items a:nth-child(11){background-color:#fff3d0;color:#f67c23;}
body.night .widget-tags .items a:nth-child(12){background-color:#bbf1f2;color:#04839d;}
body.night .widget-tags .items a:nth-child(13){background-color:#bbf1f2;color:#3ab14a;}
body.night .widget-tags .items a:nth-child(14){background-color:#ffdede;color:#e84f4f;}
body.night .widget-tags .items a:nth-child(15){background-color:#d9fcda;color:#3ab14a;}
body.night .widget-tags .items a:nth-child(16){background-color:#d9f2fb;color:#1aa9fb;}
body.night .widget-tags .items a:nth-child(17){background-color:#d9f2fb;color:#a123db;}
body.night .widget-tags .items a:nth-child(18){background-color:#d9fcda;color:#04839d;}
body.night .widget-tags .items a:nth-child(19){background-color:#f8cbff;color:#a123db;}
body.night .widget-tags .items a:nth-child(20){background-color:#d9fcda;color:#3ab14a;}
body.night .widget-tags .items a:nth-child(21){background-color:#bbf1f2;color:#04839d;}
body.night .widget-tags .items a:nth-child(22){background-color:#d9fcda;color:#3ab14a;}
body.night .widget-tags .items a:nth-child(23){background-color:#f8cbff;color:#a123db;}
body.night .widget-tags .items a:nth-child(24){background-color:#f8cbff;color:#04839d;}
body.night .widget-tags .items a:nth-child(25){background-color:#ffdede;color:#e84f4f;}
body.night .widget-tags .items a:nth-child(26){background-color:#fff3d0;color:#f67c23;}
body.night .widget-tags .items a:nth-child(27){background-color:#d9fcda;color:#04839d;}
body.night .widget-tags .items a:nth-child(28){background-color:#d9fcda;color:#3ab14a;}
body.night .widget-tags .items a:nth-child(29){background-color:#d9fcda;color:#1aa9fb;}
body.night .widget-tags .items a:nth-child(30){background-color:#f8cbff;color:#a123db;}
然后打开Modown主题设置 → 样式 → 自定义CSS样式,粘贴以上CSS代码,保存即可!
请先
!