Skip to content

Commit 0fe73c0

Browse files
committed
perf: 优化 autohue 渐变效果
1 parent f673cc2 commit 0fe73c0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

autohue.js/index.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
.leftCover,
2424
.rightCover {
2525
height: 100%;
26-
width: 30%;
26+
width: 50%;
2727
position: absolute;
2828
}
2929
.leftCover {

autohue.js/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ <h2>autohue.js</h2>
8585
autohue(dir + item, { threshold: { primary: 10, left: 1, right: 1 } }).then((res) => {
8686
const bgColor = `linear-gradient(90deg, ${res.backgroundColor.left}, ${res.backgroundColor.right})`
8787
const hueBox = document.getElementById(`${item}`)
88-
hueBox.children[0].style.background = `linear-gradient(90deg,${res.backgroundColor.left},98%, transparent)`
89-
hueBox.children[2].style.background = `linear-gradient(-90deg,${res.backgroundColor.right},98%, transparent)`
88+
hueBox.children[0].style.background = `linear-gradient(90deg,${res.backgroundColor.left} 50%, transparent 60%)`
89+
hueBox.children[2].style.background = `linear-gradient(-90deg,${res.backgroundColor.right} 50%, transparent 60%)`
9090
})
9191
}
9292
</script>

0 commit comments

Comments
 (0)