内容来自网上

css

导航栏居中

1
2
3
4
5
6
#nav .menus_items {
position: absolute;
width: fit-content;
left: 50%;
transform: translateX (-50%);
}

透明度调节

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* 文章页背景 最后一个参数表示透明度,范围是 0(完全透明)到 1(完全不透明 */
.layout_post>#post {
/* 以下代表透明度为 0.7 可以自行修改 */
background: rgba (255, 255, 255, 0.5);
}

/* 所有页面背景 */
#aside_content .card-widget, #recent-posts>.recent-post-item, .layout_page>div:first-child:not (.recent-posts), .layout_post>#page, .layout_post>#post, .read-mode .layout_post>#post{
/* 以下代表透明度为 0.7 */
background: rgba (255, 255, 255, 0.5);
}
/* 侧边卡片的透明度 */
:root {
--card-bg: rgba (255, 255, 255, 0.5);
}
/* 页脚透明 */
#footer {
/* 以下代表透明度为 0.7 */
background: rgba (255, 255, 255, 0);
}

js

标签页添加 w (゚Д゚) w 不要走!再看看嘛!,回到本站显示♪(^∇^*) 欢迎回来!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
  // 动态标题 
var OriginTitile = document.title;
var titleTime;
document.addEventListener ('visibilitychange', function () {
if (document.hidden) {
// 离开当前页面时标签显示内容
document.title = 'w (゚Д゚) w 不要走!再看看嘛!';
clearTimeout (titleTime);
}
else {
// 返回当前页面时标签显示内容
document.title = '♪(^∇^*) 欢迎回来!' + OriginTitile;
// 两秒后变回正常标题
titleTime = setTimeout (function () {
document.title = OriginTitile;
}, 2000);
}
});