本网站优化代码以及添加其他小工具

2024年4月12日10:20:43 1
微信搜一搜 ts小陈

本站美化以及增加的其他小工具修改

一、自定义样式

本站样式修改css,可根据备注删除不要的样式,将以下css添加到后台-定制风格-自定义样式中即可。

  1. /*首页关于本站修改*/
  2. #feed_widget a {
  3. color: #000;
  4. width: 40px;
  5. display: block;
  6. text-align: center;
  7. height: 40px;
  8. line-height: 34px;
  9. margin: 0 auto;
  10. border-radius: 20px;
  11. border: 1px solid #ddd;
  12. }
  13. #feed_widget .feed a {
  14. color: #d28300;
  15. border: 1px solid #d28300
  16. }
  17. #feed_widget .feed a:hover {
  18. background: #d28300;
  19. color: #fff !important;
  20. border: 1px solid #d28300
  21. }
  22. #feed_widget .weixin a {
  23. color: #248a34;
  24. border: 1px solid #248a34;
  25. }
  26. #feed_widget .weixin a:hover {
  27. background: #248a34;
  28. color: #fff! important;
  29. border: 1px solid #248a34
  30. }
  31. #feed_widget .tsina a {
  32. color: #c40000;
  33. border: 1px solid #c40000
  34. }
  35. #feed_widget .tsina a:hover {
  36. background: #c40000;
  37. color: #fff !important;
  38. border: 1px solid #c40000
  39. }
  40. #feed_widget .tqq a {
  41. color: #4e91d1;
  42. border: 1px solid #4e91d1
  43. }
  44. #feed_widget .tqq a:hover {
  45. background: #4e91d1;
  46. color: #fff !important;
  47. border: 1px solid #4e91d1
  48. }
  49. /*幻灯片缩略图修改*/
  50. #slideshow #slider img{border-radius:5px;border:0}
  51. .thumbnail{box-shadow: rgba(0,0,0,0.5) 2px 2px 2px;border-radius:5px;border:0}
  52. /* 导航栏加粗*/
  53. #site-nav .down-menu li {
  54. font-weight: bold;
  55. }
  56. .breadcrumb {
  57. margin: 10px auto;
  58. border: 1px solid #ddd;
  59. border-radius: 2px;
  60. background-color: #fff;
  61. padding-bottom: 4px;
  62. padding-left: 10px;
  63. }
  64. /* 右侧滚动条按钮美化*/
  65. #scroll {
  66.     width: 32px;
  67.     float: rightright;
  68.     position: fixed;
  69.     rightright: 10px;
  70.     bottombottom: 50px;
  71.     z-index: 9999;
  72. }
  73. #scroll li a {
  74.     font-size: 16px;
  75.     color: #fff;
  76.     width: 32px;
  77.     height: 32px;
  78.     line-height: 28px;
  79.     text-align: center;
  80.     vertical-align: middle;
  81.     margin-top: 4px;
  82.     display: block;
  83.     cursor: pointer;
  84.     border: 1px solid #ddd;
  85.     border-radius: 15px;
  86.     box-shadow: 0 1px 1px rgba(0,0,0,0.04);
  87. }
  88. #scroll li a:hover {
  89.     background: #2f889a;
  90.     color: #fff;
  91.     border: 1px solid #2f889a;
  92.     transition: all .2s ease-in 0s;
  93. }
  94. .scroll-h {
  95.     background-color: #ff5e5c !important;
  96. }
  97. .scroll-c {
  98.     background-color: #24a5db !important;
  99. }
  100. .scroll-b {
  101.     background-color: #ff9531 !important;
  102. }
  103. #gb2big5 {
  104.     background-color: #aec534 !important;
  105. }
  106. .qr {
  107.     background-color: #4a4a4a !important;
  108. }
  109. .qqonline a {
  110.     background: #d4ae45!important;
  111. }
  112. @media screen and (min-width:900px) {
  113.     #scroll li a:hover {
  114.         background: #2f889a;
  115.         color: #fff;
  116.         border: 1px solid #2f889a;
  117.         transition: all 0.2s ease-in 0s;
  118.     }
  119. }
  120. .qr-img {
  121.     position: fixed;
  122.     background: #fff;
  123.     bottombottom: 50px;
  124.     rightright: 50px;
  125.     max-width: 300px;
  126.     z-index: 9999;
  127.     display: none;
  128.     border-radius: 4px;
  129.     padding: 10px 10px 2px 10px;
  130.     animation: fade-in;
  131.     animation-duration: 0.5s;
  132.     -webkit-animation: fade-in 0.5s;
  133.     border: 1px solid #ddd;
  134.     box-shadow: 0 1px 1px rgba(0,0,0,0.05);
  135. }
  136. #output img {
  137.     position: absolute;
  138.     top: 72px;
  139.     rightright: 72px;
  140.     width: 25px;
  141.     height: 25px;
  142. }
  143. .qr .fa-qrcode {
  144.     font-size: 20px !important;
  145.     line-height: 32px !important;
  146. }
  147. .qr-img .arrow {
  148.     position: absolute;
  149.     font-size: 26px;
  150.     bottombottom: 2px;
  151. }
  152. .arrow-y {
  153.     color: #fff;
  154.     rightright: -8px;
  155. }
  156. .arrow-z {
  157.     color: #c6c6c6;
  158.     rightright: -9px;
  159. }
  160. #output td {
  161.     border: none;
  162. }
  163. #output td {
  164.     padding: 0;
  165. }
  166. .page-template-template-blog #scroll li a.scroll-c,.page-template-template-code #scroll li a.scroll-c,.page-template-template-links #scroll li a.scroll-c,.page-template-template-archives #scroll li a.scroll-c,.page-template-template-cms #scroll li a.scroll-c,.page-template-template-hot #scroll li a.scroll-c,.page-template-template-tag #scroll li a.scroll-c,.page-template-template-tougao #scroll li a.scroll-c,.page-template-template-contact #scroll li a.scroll-c,.page-template-template-message #scroll li a.scroll-c,.page-template-template-baidu #scroll li a.scroll-c {
  167.     display: none;
  168. }
  169. #scroll li a {
  170.     background: #2f9a3c;
  171. }
  172. .tagcloud {
  173.     overflow: hidden;
  174.     padding: 15px 0 12px 15px;
  175. }
  176. .tagcloud a {
  177.     float: left;
  178.     width: 31.3333%;
  179.     margin: 0 1% 1% 0;
  180.     padding: 0 8px;
  181.     color: #000;
  182.     height: 29px;
  183.     line-height: 29px;
  184.     text-align: center;
  185.     opacity: .7;
  186.     border-radius: 2px;
  187.     overflow: hidden;
  188. }
  189. /*去掉幻灯上的标题文字*/
  190. .slider-caption {display: none; }
  191. /*顶部导航添加渐变色*/
  192. #top-header {
  193.     background: linear-gradient(-30deg,rgb(250 234 178 / 71%) 10%,rgba(161,230,243,.78)) no-repeat;
  194.     border-bottom: 1px solid #dedede;
  195. }
  196. /* 选中效果浮动背景*/
  197. .entry-more a {
  198.     opacity:0
  199. }
  200. .post:hover .entry-more a {
  201.     rightright:0;
  202.     opacity:1;
  203. }
  204. .post {
  205.     transition:all 0.3s ease 0s;
  206. }
  207. .post:hover {
  208.     transform:translateY(-3px);
  209.     z-index:1;
  210.     -webkit-box-shadow:0 15px 32px rgb(197 175 241)!important;
  211. }

二、网站底部添加运行时长

  1. <p>已稳定运行 <span id="span_dt_dt" style="color: #0196e3;"></span>
    <script type="text/javascript">
    function show_date_time(){
    window.setTimeout("show_date_time()", 1000);var BirthDay = new Date("1/25/2021 00:00:00");var today = new Date();var timeold = (today.getTime() - BirthDay.getTime());var sectimeold = timeold / 1000;
    var secondsold = Math.floor(sectimeold);var msPerDay = 24 * 60 * 60 * 1000;var msPer = 365 * 24 * 60 * 60 * 1000;var e_ysold = timeold / msPer;var ysold = Math.floor(e_ysold);var e_daysold = timeold / msPerDay;var daysold = Math.floor((e_ysold - ysold) * 365);var aaasold = Math.floor(e_daysold);var e_hrsold = (e_daysold - aaasold) * 24;var hrsold = Math.floor(e_hrsold);var e_minsold = (e_hrsold - hrsold) * 60;var minsold = Math.floor((e_hrsold - hrsold) * 60);var seconds = Math.floor((e_minsold - minsold) * 60);document.getElementById("span_dt_dt").innerHTML = '<font style="color:#FF0000">' + ysold + '</font> 年<font style="color:#FF0000">' + daysold + '</font> 天 <font style="color:#FF0000">' + hrsold + '</font> 时 <font style="color:#FF0000">' + minsold + '</font> 分 <font style="color:#FF0000">' + seconds + '</font> 秒';
    }show_date_time();</script>

 

ts小陈

发表评论(不允许含有网址!)

:?: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :cry: :mrgreen: :neutral: :razz:

😀

已登录用户不需要填写以下内容

目前评论:1条   互动热度:普通

    • avatar LHB 辽宁省鞍山市 移动 0

      真的很负责,谢谢小陈