## 前言 此篇用来记录博客美化,防止遗忘,随时补充更新,部分内容来自网络,只是收藏整合。 [scode type="green"]本篇文章将持续更新 ::twemoji:star:: [/scode] ## 右侧导航栏 打开后台-更改外观-设置外观-开发者设置-复制代码粘贴至自定义CSS即可 ```java /*右侧导航栏*/ .sidebar-icon svg.feather.feather-thumbs-up{color: #ff0000;} .sidebar-icon svg.feather.feather-message-square{color:#495dc3;} .sidebar-icon svg.feather.feather-gift{color:#52DE97;} ``` ## 主题标题居中 打开后台-更改外观-设置外观-开发者设置-复制代码粘贴至自定义CSS即可 ```java /*主题标题居中*/ header.bg-light.lter.wrapper-md { text-align: center; } ``` ## 页面两侧框架留白间距 打开后台-更改外观-设置外观-开发者设置-复制代码粘贴至自定义CSS即可 ```java /*两侧框架留白间距*/ @media (min-width:1700px) { .app.container { width: 95% } .app.container .app-aside, .app.container .app-header { max-width: 95% } } @media (min-width:2048px) { .app.container { width: 93% } .app.container .app-aside, .app.container .app-header { max-width: 93% } } @media (min-width:1200px) { .app.container { width: 90% } .app.container .app-aside, .app.container .app-header { max-width: 90% } .app.container .app-footer-fixed { max-width: 970px } .app.container.app-aside-folded .app-footer-fixed { max-width: 1110px } .app.container.app-aside-dock .app-footer-fixed { max-width: 90% } } ``` ## handsome原生入站提示 打开后台-更改外观-设置外观-开发者设置-复制代码粘贴至自定义输出body尾部的html代码即可 ```java ``` ## 时光机头像圆形 打开后台-更改外观-设置外观-开发者设置-复制代码粘贴至自定义CSS即可 ```java /* 时光机圆形头像 */ .img-square {border-radius: 50%;} .list-group-item .thumb-sm .img-square {border-radius: 5px;} ``` ## logo扫光 打开后台-更改外观-设置外观-开发者设置-复制代码粘贴至自定义CSS即可 ```java /* 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即可 ```java /*赞赏按钮跳动开始*/ .btn-pay { animation: star 0.5s ease-in-out infinite alternate; } @keyframes star { from { transform: scale(1); } to { transform: scale(1.1); } } /*赞赏按钮跳动结束*/ ``` ## 博主介绍闪字效果 打开后台-更改外观-设置外观-初级设置-复制代码粘贴至博主的介绍即可 ```java ``` ## 鼠标点击特效 打开后台-更改外观-设置外观-开发者设置-复制代码粘贴至自定义JavaScript即可 ```java /* 鼠标点击特效 */ var a_idx = 0; jQuery(document).ready(function($) { $("body").click(function(e) { var a = new Array("富强", "民主", "文明", "和谐", "自由", "平等", "公正" ,"法治", "爱国", "敬业", "诚信", "友善"); var $i = $("").text(a[a_idx]); a_idx = (a_idx + 1) % a.length; var x = e.pageX, y = e.pageY; $i.css({ "z-index": 999999999999999999999999999999999999999999999999999999999999999999999, "top": y - 20, "left": x, "position": "absolute", "font-weight": "bold", "color": "#FA7298" }); $("body").append($i); $i.animate({ "top": y - 180, "opacity": 0 }, 1500, function() { $i.remove(); }); }); }); ``` ## 复制版权提示 打开后台-更改外观-设置外观-开发者设置-复制代码粘贴至自定义JavaScript即可 ```java /* 复制成功提示代码开始 */ kaygb_copy();function kaygb_copy(){$(document).ready(function(){$("body").bind('copy',function(e){hellolayer()})});var sitesurl=window.location.href;function hellolayer(){ $.message({ message: "尊重原创,转载请注明出处! 本文作者:高先生笔记原文链接:"+sitesurl, title: "复制成功", type: "warning", autoHide: !1, time: "3000" }) }} /* 复制成功提示代码结束 */ ``` ## 彩色标签云及右栏数字 打开后台-更改外观-设置外观-开发者设置-复制代码粘贴至自定义JavaScript即可 ```java /*彩色标签云代码开始*/ let tags = document.querySelectorAll("#tag_cloud-2 a"); let infos = document.querySelectorAll(".badge"); let colorArr = ["#428BCA", "#AEDCAE", "#ECA9A7", "#DA99FF", "#FFB380", "#D9B999"]; tags.forEach(tag => { tagsColor = colorArr[Math.floor(Math.random() * colorArr.length)]; tag.style.backgroundColor = tagsColor; }); infos.forEach(info => { infosColor = colorArr[Math.floor(Math.random() * colorArr.length)]; info.style.backgroundColor = infosColor; }); /*彩色标签云代码结束*/ ``` ## 自定义右键 打开后台-更改外观-设置外观-开发者设置-复制代码粘贴至自定义输出body 尾部的HTML代码即可 ```java 首页 复制 搜索 前进 后退 重载网页 关于作者