Skip to content

Commit

Permalink
add slider
Browse files Browse the repository at this point in the history
  • Loading branch information
pengtikui committed Dec 30, 2016
1 parent 3a6a7e1 commit 7551e48
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ WeUI 是由微信官方设计团队为微信内网页和微信小程序开发的
+ [按钮](components/button.md)
+ [表单](components/form.md)
+ [列表](components/list.md)
+ [滑块](components/slider.md)
- 基础组件
+ [文章](components/article.md)
+ [Flex 布局](components/flex.md)
Expand Down
21 changes: 21 additions & 0 deletions components/slider.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
## 滑块

滑块可用于用户输入数值的一种方式,WeUI 中仅包含 CSS 样式,JS 部分可自行实现或使用 [weui.js(点击查看相关文档)](https://github.com/weui/weui.js/blob/master/docs/component/slider.md)

```html
<!-- 滑块 -->
<div class="weui-slider-box">
<div class="weui-slider">
<div class="weui-slider__inner">
<div class="weui-slider__track" style="width: 62%;"></div>
<div class="weui-slider__handler" style="left: 62%;"></div>
</div>
</div>
<!-- 显示数值,可选 -->
<div class="weui-slider-box__value">62</div>
</div>
```

`weui-slider__track``width` 属性和 `weui-slider__handler``left` 属性表示滑块的进度,且两者的值相同。

![](../images/slider-1.jpg)
Binary file added images/slider-1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7551e48

Please sign in to comment.