An open API service indexing awesome lists of open source software.

https://github.com/bioforestchain/scroll-snap

the layout chang event will be emited when you use the scroll snap
https://github.com/bioforestchain/scroll-snap

Last synced: 5 months ago
JSON representation

the layout chang event will be emited when you use the scroll snap

Awesome Lists containing this project

README

          

# scroll-Snap - WebComponent
the layout chang event will be emited when you use the scroll snap

## Background

When I discovered that CSS scroll-snap was used, there were no event callbacks when layout were changed. This specification started as a result of that.

## Install

This project uses [npm](https://npmjs.com). Go check them out if you don't have them locally installed.

```sh
$ npm install @bfchain/scroll-snap --save
```

## Usage

```sh




# Remember add attribute`name="scroll-container"` to the element when you use it.
```

## Example Readmes
```sh


.slides {
width: 200px;
height: 300px;
overflow: scroll hidden;
scroll-snap-type: x mandatory;
display: flex;
}
.slide {
height: 100%;
scroll-snap-align: center;
scroll-snap-stop: always;
flex: none;
}
.slide1 {
width: 100%;
background-color: blanchedalmond;
}
.slide2 {
width: 50px;
background-color: aqua;
}




```
## Maintainers

[@Huiyong-Chen](https://github.com/Huiyong-Chen)。

## License

[MIT](LICENSE) © Huiyong Chen