{"id":333018,"date":"2021-01-20T17:29:40","date_gmt":"2021-01-21T01:29:40","guid":{"rendered":"https:\/\/css-tricks.com\/?p=333018"},"modified":"2021-01-26T12:29:35","modified_gmt":"2021-01-26T20:29:35","slug":"scrollbars-on-hover","status":"publish","type":"post","link":"https:\/\/css-tricks.com\/scrollbars-on-hover\/","title":{"rendered":"Scrollbars on Hover"},"content":{"rendered":"\n

First, scrollbars are a usability and accessibility thing. Second, a rule of thumb: if an area scrolls, it should have a visible scrollbar. But the web is a big place and I like tricks, so I’m going to cover the idea of only revealing them on hover. Even macOS itself\u00b9<\/a> hides scrollbars by default, revealing them contextually and on interaction. Same on iOS, leading to confusing moments<\/a>. <\/p>\n\n\n\n\n\n\n\n

All that aside, here’s a way to hide scrollbars by default, only revealing them when the element is hovered. It was created by Thomas Gladdines, who also emailed me about it:<\/p>\n\n\n\n