ant-design/components/slider/demo/icon-slider.md
lijianan e8fa5938ab
site: rewrite with CSS logical properties (#50109)
* site: use CSS logical properties

* Update components/anchor/demo/targetOffset.tsx

Co-authored-by: afc163 <afc163@gmail.com>
Signed-off-by: lijianan <574980606@qq.com>

* fix: fix

* fix: fix

* chore: fix

* fix: add more

* fix: add more

---------

Signed-off-by: lijianan <574980606@qq.com>
Co-authored-by: afc163 <afc163@gmail.com>
2024-07-28 10:43:45 +08:00

37 lines
566 B
Markdown

## zh-CN
滑块左右可以设置图标来表达业务含义。
## en-US
You can add an icon beside the slider to make it meaningful.
```css
.icon-wrapper {
position: relative;
padding: 0 30px;
}
.icon-wrapper .anticon {
position: absolute;
top: -2px;
width: 16px;
height: 16px;
color: rgba(0, 0, 0, 0.25);
font-size: 16px;
line-height: 1;
}
.icon-wrapper .icon-wrapper-active {
color: rgba(0, 0, 0, 0.45);
}
.icon-wrapper .anticon:first-child {
inset-inline-start: 0;
}
.icon-wrapper .anticon:last-child {
inset-inline-end: 0;
}
```