Skip to content

Commit 02084cd

Browse files
committed
fix: carousel customArrows demo
1 parent 78e156f commit 02084cd

File tree

1 file changed

+20
-19
lines changed

1 file changed

+20
-19
lines changed

components/carousel/demo/customArrows.md

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,20 @@ Custom arrows display
1111
```html
1212
<template>
1313
<a-carousel arrows>
14-
<template slot="prevArrow" slot-scope="props">
15-
<div
16-
class="custom-slick-arrow"
17-
>
18-
<a-icon type="left-square" />
19-
</div>
20-
</template>
21-
<template slot="nextArrow" slot-scope="props">
22-
<div
23-
class="custom-slick-arrow"
24-
style="right: -20px"
25-
>
26-
<a-icon type="right-square" />
27-
</div>
28-
</template>
14+
<div
15+
slot="prevArrow" slot-scope="props"
16+
class="custom-slick-arrow"
17+
style="left: 10px;zIndex: 1"
18+
>
19+
<a-icon type="left-circle" />
20+
</div>
21+
<div
22+
slot="nextArrow" slot-scope="props"
23+
class="custom-slick-arrow"
24+
style="right: 10px"
25+
>
26+
<a-icon type="right-circle" />
27+
</div>
2928
<div><h3>1</h3></div>
3029
<div><h3>2</h3></div>
3130
<div><h3>3</h3></div>
@@ -46,16 +45,18 @@ export default {}
4645
}
4746
4847
.ant-carousel >>> .custom-slick-arrow {
49-
display: block;
48+
width: 25px;
49+
height: 25px;
5050
font-size: 25px;
51-
background: #fff;
52-
color: #5d5959;
51+
color: #fff;
52+
background-color: rgba(31,45,61,.11);
53+
opacity: 0.3;
5354
}
5455
.ant-carousel >>> .custom-slick-arrow:before {
5556
display: none;
5657
}
5758
.ant-carousel >>> .custom-slick-arrow:hover {
58-
color: #403d3d
59+
opacity: 0.5;
5960
}
6061
6162
.ant-carousel >>> .slick-slide h3 {

0 commit comments

Comments
 (0)