Skip to content

Commit

Permalink
docs(cn): translate plugins/official/scroll-snap (#111)
Browse files Browse the repository at this point in the history
docs(cn): translate plugins/official/scroll-snap
  • Loading branch information
HerbertHe committed Nov 1, 2021
2 parents 166cd62 + 7e45616 commit 2bc2c8a
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions plugins/official/scroll-snap.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
# Scroll Snap
# Scroll Snap {#scroll-snap}

inspired by [tailwindcss-scroll-snap](https://github.com/innocenzi/tailwindcss-scroll-snap)
灵感来源于 [tailwindcss-scroll-snap](https://github.com/innocenzi/tailwindcss-scroll-snap)


## Utilities
## 工具类 {#utilities}

| Class | Properties | Description |
| Class | 属性 | 描述 |
| :---------------------------- | :------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------- |
| `snap` | scroll-snap-type: <br> var(--scroll-snap-axis, both) <br> var(--scroll-snap-strictness, mandatory) | main snap class |
| __Strictness__ | | |
| __严格性__ | | |
| `snap-none` | --scroll-snap-strictness: none | |
| `snap-mandatory` | --scroll-snap-strictness: mandatory | |
| `snap-proximity` | --scroll-snap-strictness: proximity | |
| __Axis__ | | |
| __坐标轴__ | | |
| `snap-x` | --scroll-snap-axis: x | |
| `snap-y` | --scroll-snap-axis: y | |
| `snap-block` | --scroll-snap-axis: block | |
| `snap-inline` | --scroll-snap-axis: inline | |
| `snap-both` | --scroll-snap-axis: both | |
| __Align__ | | |
| __对齐__ | | |
| `snap-start` | scroll-snap-align: start | |
| `snap-end` | scroll-snap-align: end | |
| `snap-center` | scroll-snap-align: center | |
| __Stop__ | | |
| __停止__ | | |
| `snap-normal` | scroll-snap-stop: normal | |
| `snap-always` | scroll-snap-stop: always | |
| __Margin__ | | |
| `snap-m${direction}-${value}` | scroll-snap-margin`${direction}`: `${value}` | same [Margin Utilities](/utilities/spacing.html#margin-%E2%AD%90%EF%B8%8F) |
| __Padding__ | | |
| `snap-p${direction}-${value}` | scroll-snap-padding`${direction}`: `${value}` | same [Padding Utilities](/utilities/spacing.html#padding-%E2%AD%90%EF%B8%8F) |
| __Other__ | | |
| `scrollbar-hide` | scrollbar-width: none<br>::-webkit-scrollbar: {<br>&nbsp;&nbsp;display: none<br>} | visual hide scrollbar |
| __外边距__ | | |
| `snap-m${direction}-${value}` | scroll-snap-margin`${direction}`: `${value}` | [外边距工具类](/utilities/spacing.html#margin-%E2%AD%90%EF%B8%8F) 相同 |
| __内边距__ | | |
| `snap-p${direction}-${value}` | scroll-snap-padding`${direction}`: `${value}` | [内边距工具类](/utilities/spacing.html#padding-%E2%AD%90%EF%B8%8F) 相同 |
| __其它__ | | |
| `scrollbar-hide` | scrollbar-width: none<br>::-webkit-scrollbar: {<br>&nbsp;&nbsp;display: none<br>} | 视觉隐藏滚动条 |


## Usage
## 用法 {#usage}

```js windi.config.js
export default {
Expand All @@ -44,7 +44,7 @@ export default {
}
```

with TypeScript:
使用 TypeScript:

```ts windi.config.ts
import scrollSnapPlugin from 'windicss/plugin/scroll-snap'
Expand Down

0 comments on commit 2bc2c8a

Please sign in to comment.