Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1303593

Browse files
committed
docs(styling): add a custom style example
1 parent e156f84 commit 1303593

File tree

3 files changed

+107
-8
lines changed

3 files changed

+107
-8
lines changed

demo/demo.css

Lines changed: 86 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,98 @@
1-
* { margin: 0; padding: 0; }
2-
body { font-family: 'Open Sans', sans-serif; color: #1f2636; font-size: 14px; padding-bottom: 40px; }
3-
header { background: #0db9f0; color: #fff; margin: -40px; margin-bottom: 40px; text-align: center; padding: 40px 0; }
4-
h1 { font-weight: 300; }
5-
h2 {margin-bottom:10px;}
6-
.wrapper { background: #fff; padding: 40px; }
7-
article { margin-bottom: 10px; }
8-
.tab-pane{
1+
* {
2+
margin: 0;
3+
padding: 0;
4+
}
5+
6+
body {
7+
font-family: 'Open Sans', sans-serif;
8+
color: #1f2636;
9+
font-size: 14px;
10+
padding-bottom: 40px;
11+
}
12+
13+
header {
14+
background: #0db9f0;
15+
color: #fff;
16+
margin: -40px;
17+
margin-bottom: 40px;
18+
text-align: center;
19+
padding: 40px 0;
20+
}
21+
22+
h1 {
23+
font-weight: 300;
24+
}
25+
26+
h2 {
27+
margin-bottom: 10px;
28+
}
29+
30+
.wrapper {
31+
background: #fff;
32+
padding: 40px;
33+
}
34+
35+
article {
36+
margin-bottom: 10px;
37+
}
38+
39+
.tab-pane {
940
padding-top: 10px;
1041
}
42+
1143
.field-title {
1244
width: 100px;
1345
}
1446

1547
.vertical-sliders {
1648
margin: 0;
1749
}
50+
1851
.vertical-sliders > div {
1952
height: 250px;
2053
}
54+
55+
.custom-slider.rzslider .rz-bar {
56+
background: #ffe4d1;
57+
height: 2px;
58+
}
59+
60+
.custom-slider.rzslider .rz-selection {
61+
background: orange;
62+
}
63+
64+
.custom-slider.rzslider .rz-pointer {
65+
width: 8px;
66+
height: 16px;
67+
top: auto; /* to remove the default positioning */
68+
bottom: 0;
69+
background-color: #333;
70+
border-top-left-radius: 3px;
71+
border-top-right-radius: 3px;
72+
}
73+
74+
.custom-slider.rzslider .rz-pointer:after {
75+
display: none;
76+
}
77+
78+
.custom-slider.rzslider .rz-bubble {
79+
bottom: 14px;
80+
}
81+
82+
.custom-slider.rzslider .rz-limit {
83+
font-weight: bold;
84+
color: orange;
85+
}
86+
87+
.custom-slider.rzslider .rz-tick {
88+
width: 1px;
89+
height: 10px;
90+
margin-left: 4px;
91+
border-radius: 0;
92+
background: #ffe4d1;
93+
top: -1px;
94+
}
95+
96+
.custom-slider.rzslider .rz-tick.rz-selected {
97+
background: orange;
98+
}

demo/demo.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,17 @@ app.controller('MainCtrl', function($scope, $rootScope, $timeout, $uibModal) {
1717
}
1818
};
1919

20+
$scope.customSlider = {
21+
minValue: 10,
22+
maxValue: 90,
23+
options: {
24+
floor: 0,
25+
ceil: 100,
26+
step: 10,
27+
showTicks: true
28+
}
29+
};
30+
2031
//Range slider with minLimit and maxLimit config
2132
$scope.minMaxLimitSlider = {
2233
value: 50,

demo/index.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,16 @@ <h2>Range slider</h2>
3636
></rzslider>
3737
</article>
3838

39+
<article>
40+
<h2>Slider with custom style</h2>
41+
<rzslider
42+
class="custom-slider"
43+
data-rz-slider-model="customSlider.minValue"
44+
data-rz-slider-high="customSlider.maxValue"
45+
data-rz-slider-options="customSlider.options"
46+
></rzslider>
47+
</article>
48+
3949
<article>
4050
<h2>Range slider with min limit set to 10 and max limit set to 90 </h2>
4151
<rzslider

0 commit comments

Comments
 (0)