Skip to content

Commit

Permalink
滚动条样式
Browse files Browse the repository at this point in the history
  • Loading branch information
Shuaige1234567 committed Dec 9, 2023
1 parent b2423d6 commit 7a6be68
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
22 changes: 14 additions & 8 deletions frontend/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,23 @@ code {
align-items: center;
}

::-webkit-scrollbar {
width: 0px;
.posts::-webkit-scrollbar {
width: 6px;
height: 6px;
}
::-webkit-scrollbar-track {

.posts::-webkit-scrollbar-track {
border-radius: 3px;
background: rgba(0,0,0,0.06);
-webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.08);
background: white;
}

/* 滚动条滑块 */
::-webkit-scrollbar-thumb {
.posts::-webkit-scrollbar-thumb {
border-radius: 3px;
background: white;
}

.posts:hover::-webkit-scrollbar-thumb {
border-radius: 3px;
background: rgba(0,0,0,0.12);
-webkit-box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
background: rgba(0, 0, 0, 0.12);
}
4 changes: 2 additions & 2 deletions frontend/src/routes/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Comment from "../components/comment";

export const Home = React.memo(()=>{
return <>
<Layout.Content style={{
<Layout.Content className={"posts"} style={{
backgroundColor: "white",
overflowY: 'auto',
scrollbarWidth: 'thin',
Expand All @@ -21,7 +21,7 @@ export const Home = React.memo(()=>{
<Post/>
<Post/>
</Layout.Content>
<Layout.Content style={{
<Layout.Content className={"posts"} style={{
backgroundColor: 'white',
overflowY: 'auto',
scrollbarWidth: 'thin',
Expand Down

0 comments on commit 7a6be68

Please sign in to comment.