食用方法
一般主题都会自带 自定义代码 这样主题设置的,只需在主题设置自定义CSS代码里面添加美化的css代码就即可美化啦!
如果主题没有 自定义代码 那么在WordPress主题目录文件里找style.css文件或者在WordPress后台里找“外观—>自定义—>额外CSS”里面美化的css代码就即可美!
单色滚动条代码:
/*滚动条显示样式*/
::-webkit-scrollbar-thumb{
background-color:#FF6666; /*更改喜欢的十六进制颜色*/
height:50px;
outline-offset:-2px;
outline:2px solid #fff;
-webkit-border-radius:4px;
border: 2px solid #fff;
}
/*滚动条大小*/
::-webkit-scrollbar{
width:8px;
height:8px;
}
/*滚动框背景样式*/
::-webkit-scrollbar-track-piece{
background-color:#fff;
-webkit-border-radius:0;
}
彩色滚动条代码:
/**彩色滚动条样式*/
::-webkit-scrollbar {
width: 10px;
height: 1px;
}
::-webkit-scrollbar-thumb {
background-color: #12b7f5;
background-image: -webkit-linear-gradient(45deg, rgba(255, 93, 143, 1) 25%, transparent 25%, transparent 50%, rgba(255, 93, 143, 1) 50%, rgba(255, 93, 143, 1) 75%, transparent 75%, transparent);
}
::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
background: #f6f6f6;
}
食用方法
第一步:阿里巴巴矢量图标库官网 —>
第二步:然后自己通过搜索框找到自己喜爱的图标并添加至购物车 —> 添加至项目 (没有项目的自己新建项目)
![图片[1]-子比主题美化教程持续更新(24-10-7)-玖居暗巷](https://wwfile.jiuqing97.top/2022/05/20220508172846792.jpg!/format/webp/lossless/true)
第三步:跳转到
![图片[2]-子比主题美化教程持续更新(24-10-7)-玖居暗巷](https://wwfile.jiuqing97.top/2022/05/20220508173001246.jpg!/format/webp/lossless/true)
第四步:在 我的项目 页面有一下按钮—>一般选
![图片[3]-子比主题美化教程持续更新(24-10-7)-玖居暗巷](https://wwfile.jiuqing97.top/2022/05/20220508173049554.jpg!/format/webp/lossless/true)
第五步:点击 –>
//at.alicdn.com/t/font_2101442_j448m0ggtp.js
第六步:引入JS代码
在当前主题设置—>
<script src="//at.alicdn.com/t/font_2101442_j448m0ggtp.js"></script>
第七步:添加css样式
在当前主题设置 –> 自定义CSS代码 或者目录下的 header.php 文件中适当位置添加以下代码:(不适用的,自行调整宽度)
<style type="text/css">
.icon {
width: 1em; height: 1em;
vertical-align: -0.15em;
fill: currentColor;
overflow: hidden;
}
</style>
第八步:添加彩色图标
一、在WordPress后台—> 外观 —> 菜单 —> 导航标签 添加以下代码:
<svg class="icon fa-spin" aria-hidden="true"><use xlink:href="#iconziyuan"></use></svg> 文章分类
二、上面的
![图片[4]-子比主题美化教程持续更新(24-10-7)-玖居暗巷](https://wwfile.jiuqing97.top/2022/05/20220508173556759.jpg!/format/webp/lossless/true)
三、如何让菜单分类图标旋转起来?
1.在自己网站主题的CSS中加入以下代码:
.fa-spin {
animation: 2s linear 0s normal none infinite running fa-spin;
}
2.在WordPress后台,将“fa-spin”添加到菜单中要旋转的图标代码的“class”中。
<svg class="icon fa-spin" aria-hidden="true"><use xlink:href="#iconziyuan"></use></svg> 文章分类
CSS代码:
/点击更多/
.theme-pagination .ajax-next a, .theme-pagination .order-ajax-next a{border-radius: 30px; padding: 15px 0; color: var(--muted-color); background-color:var(--main-bg-color);color: #FF0033;display: block;opacity: 1;font-weight:bold;}
截图:
![图片[5]-子比主题美化教程持续更新(24-10-7)-玖居暗巷](https://wwfile.jiuqing97.top/2022/05/20220508174517915.jpg!/format/webp/lossless/true)
CSS代码:
/* logo扫光 */
.navbar-brand{position:relative;overflow:hidden;margin: 0px 0 0 0px;}.navbar-brand:before{content:""; position: absolute; left: -665px; top: -460px; width: 200px; height: 15px; background-color: rgba(255,255,255,.5); -webkit-transform: rotate(-45deg); -moz-transform: rotate(-45deg); -ms-transform: rotate(-45deg); -o-transform: rotate(-45deg); transform: rotate(-45deg); -webkit-animation: searchLights 6s ease-in 0s infinite; -o-animation: searchLights 6s ease-in 0s infinite; animation: searchLights 6s ease-in 0s infinite;}@-moz-keyframes searchLights{50%{left: -100px; top: 0;} 65%{left: 120px; top: 100px;}}@keyframes searchLights{40%{left: -100px; top: 0;} 60%{left: 120px; top: 100px;} 80%{left: -100px; top: 0px;}}
具体效果请看本站左上角LOGO
CSS代码:
/*导航栏字体加粗*/
ul.nav {font-weight: 700;}
截图效果:
![图片[6]-子比主题美化教程持续更新(24-10-7)-玖居暗巷](https://wwfile.jiuqing97.top/2022/05/20220508174812741.png!/format/webp/lossless/true)
CSS代码:
/*头像呼吸光环和鼠标悬停旋转放大*/
.avatar{border-radius: 50%; animation: light 4s ease-in-out infinite; transition: 0.5s;}.avatar:hover{transform: scale(1.15) rotate(720deg);}@keyframes light{0%{box-shadow: 0 0 4px #f00;} 25%{box-shadow: 0 0 16px #0f0;} 50%{box-shadow: 0 0 4px #00f;} 75%{box-shadow: 0 0 16px #0f0;} 100%{box-shadow: 0 0 4px #f00;}}
CSS代码:
/*首页文章列表悬停上浮*/
@media screen and (min-width: 980px){.tab-content .posts-item:not(article){transition: all 0.3s;}.tab-content .posts-item:not(article):hover{transform: translateY(-10px); box-shadow: 0 8px 10px rgba(255, 112, 173, 0.35);}}
效果截图:
![图片[7]-子比主题美化教程持续更新(24-10-7)-玖居暗巷](https://wwfile.jiuqing97.top/2022/05/20220508175044736.png!/format/webp/lossless/true)
//动态标题
var OriginTitile = document.title,
titleTime;
document.addEventListener("visibilitychange",
function() {
if (document.hidden) {
document.title = "你别走吖 Σ(っ °Д °;)っ";
clearTimeout(titleTime)
} else {
document.title = "(/≧▽≦/)你又回来啦! " ;
titleTime = setTimeout(function() {
document.title = OriginTitile
},
2000)
}
});
如果你的网站主题设置没有
或者在首页文件位于“head”标签之前添加下面的代码也可以。
<script type="text/javascript">
/* 动态标题*/
var OriginTitile = document.title,
titleTime;
document.addEventListener("visibilitychange",
function() {
if (document.hidden) {
document.title = "你别走吖 Σ(っ °Д °;)っ";
clearTimeout(titleTime)
} else {
document.title = "(/≧▽≦/)你又回来啦!" ;
titleTime = setTimeout(function() {
document.title = OriginTitile
},
2000)
}
});
</script>
效果截图:
![图片[8]-子比主题美化教程持续更新(24-10-7)-玖居暗巷](https://wwfile.jiuqing97.top/2022/05/20220508175617534.png!/format/webp/lossless/true)
![图片[9]-子比主题美化教程持续更新(24-10-7)-玖居暗巷](https://wwfile.jiuqing97.top/2022/05/20220508175646189.png!/format/webp/lossless/true)
CSS代码:
/** 鼠标样式 开始**/
/** 普通指针样式**/
body{cursor: url(https://a-oss.zmki.cn/img/5ccab616ea9c8.cur), default;}
/** 链接指针样式**/
a:hover{cursor:url(https://a-oss.zmki.cn/img/5ccab63d8fc80.cur), pointer;}
/** 鼠标样式 结束**/
网友投稿
/*鼠标指针样式*/
body{cursor:url(https://www.jishusongshu.com/wp-content/uploads/2020/01/normal1.png), default;}
a:hover{cursor:url(https://www.jishusongshu.com/wp-content/uploads/2020/01/link1.png), pointer;}
网站后台—>外观—>小工具—>自定义HTML,然后添加到合适位置集合即可。
代码:
<!--跑马灯公告-->
<style>
#nr{font-size:20px; margin: 0; background: -webkit-linear-gradient(left, #ffffff, #ff0000 6.25%, #ff7d00 12.5%, #ffff00 18.75%, #00ff00 25%, #00ffff 31.25%, #0000ff 37.5%, #ff00ff 43.75%, #ffff00 50%, #ff0000 56.25%, #ff7d00 62.5%, #ffff00 68.75%, #00ff00 75%, #00ffff 81.25%, #0000ff 87.5%, #ff00ff 93.75%, #ffff00 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-size: 200% 100%; animation: masked-animation 2s infinite linear;} @keyframes masked-animation{0%{background-position: 0 0;} 100%{background-position: -100%, 0;} }
</style>
<div style="background-color:#333;border-radius:25px;box-shadow:0px 0px 5px #f200ff;padding:5px;margin-bottom:0px;">
<marquee>
<b id="nr">玖居暗巷-玄之又玄暗巷之门。</b> </marquee>
</div>
- 最新
- 最热
只看作者