Skip to content

Commit 4b9b9e1

Browse files
committed
changed: 修改菜单的毛玻璃效果
1 parent 9f0dd51 commit 4b9b9e1

File tree

3 files changed

+18
-16
lines changed

3 files changed

+18
-16
lines changed

background.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
</div>
1616
<div class="weather"></div>
1717
<!----------------------- 搜索框 ------------------>
18-
<input type="text" id="search">
18+
<input type="text" id="search" autocomplete="off">
1919
<!----------------------- 彩虹屁 ----------------->
2020
<h2 id="chp"></h2>
2121
<!------------------------ 历史记录 ---------------->

css/background.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ html {
2424
--set_btn_bg: rgba(255, 255, 255, 1);
2525
--chp_bg: transparent;
2626
--chp_color: #fff;
27-
--menu-bg: rgba(255, 255, 255, .9);
27+
--menu-bg: hsla(0, 0%, 100%, .75);
2828
--search-bg: rgba(255, 255, 255, 0.6);
2929
--search-color: #000;
3030
--search-bg-focus: rgba(255, 255, 266, 0.8)
@@ -158,6 +158,8 @@ html {
158158
user-select: none;
159159
padding: 0 10px;
160160
box-sizing: border-box;
161+
backdrop-filter: blur(5px);
162+
161163
}
162164
#menu .menu-item{
163165
margin: 20px 0;

inject/index.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
(function() {
2-
let css = `html, img {
3-
filter: invert(1) hue-rotate(.5turn);
4-
}
5-
img {
6-
opacity: .75;
7-
}`
8-
let cssStyle = document.createElement("style");
9-
cssStyle.textContent = css;
10-
if (document.head) {
11-
document.head.append(cssStyle);
12-
} else {
13-
const root = document.documentElement;
14-
root.append(cssStyle);
15-
}
2+
// let css = `html, img {
3+
// filter: invert(1) hue-rotate(.5turn);
4+
// }
5+
// img {
6+
// opacity: .75;
7+
// }`
8+
// let cssStyle = document.createElement("style");
9+
// cssStyle.textContent = css;
10+
// if (document.head) {
11+
// document.head.append(cssStyle);
12+
// } else {
13+
// const root = document.documentElement;
14+
// root.append(cssStyle);
15+
// }
1616
})();

0 commit comments

Comments
 (0)