Socket
Socket
Sign inDemoInstall

rich-scroll-bar

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    rich-scroll-bar

一个兼容到ie8的的滚动条


Version published
Weekly downloads
3
decreased by-75%
Maintainers
1
Install size
75.1 kB
Created
Weekly downloads
 

Readme

Source

RICH-SCROLL-BAR

一个兼容到ie8的的滚动条

Alt text

使用方法

给任意元素加上scroll属性即可实现滚动,scroll属性中可以写css样式,可以使用scroll-speed属性来改变滚动速度,大致如下:

<!-- 定义一个宽度为8,颜色为红色的滚动条,以标准速度的2倍进行滚动 -->
<div scroll="width:8px; background:#f00" scroll-speed="2">...</div>

<!-- 定义一个默认样式的滚动条,以标准速度滚动 -->
<div scroll>...</div>

特别说明

  • 添加滚动属性的dom不能是输入框
  • 添加滚动属性的dom的position必须是fixed、absolute、relativ之一
  • 如果改变滚动区域里面的内容,需要对 .scroll-body 进行改动

Keywords

FAQs

Last updated on 08 Jan 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc