bulletScreen
bulletScreen based on canvas
Links
Install
npm install bullet-screen
or
<script src="https://cdn.jsdelivr.net/npm/bullet-screen@latest/dist/bulletScreen.js"></script>
Usage
<!-- this div need set width and height (inline or css) -->
const bullet = id: "app"// sendbulletbulletbullet
Constructor
Attribute | Description | Default |
---|---|---|
id | placeholder | none |
speed | speed | 2 |
color | default text color | #000 |
size | default text size | 16 |
gap | default gap between text | 4 |
API
- run: bullet.run()
- stop: bullet.stop()
- send: type default / color / static bullet.push(text, type)
EVENT
bullet
Example
PS
如果喜欢请给个星星,谢谢。 If you like, please give me a star, thank you.
如果需要帮助: QQ:1573815240 邮箱: 1573815240@qq.com if you need help: QQ:1573815240 email: 1573815240@qq.com