antd
Version:
An enterprise-class UI design language and React-based implementation
123 lines (122 loc) • 2.99 kB
CSS
.ant-slider {
position: relative;
margin: 10px 8px;
height: 12px;
border-radius: 5px;
background-color: #e9e9e9;
cursor: pointer;
border-top: 4px solid #fff;
border-bottom: 4px solid #fff;
-webkit-transition: background-color 0.3s ease;
transition: background-color 0.3s ease;
}
.ant-slider-track {
position: absolute;
left: 0;
height: 4px;
border-radius: 6px;
background-color: #abe2fb;
z-index: 1;
-webkit-transition: background-color 0.3s ease;
transition: background-color 0.3s ease;
}
.ant-slider:hover {
background-color: #e1e1e1;
}
.ant-slider:hover .ant-slider-handle {
border-color: #57c5f7;
}
.ant-slider:hover .ant-slider-track {
background-color: #81d4f9;
}
.ant-slider-handle {
position: absolute;
margin-left: -7px;
margin-top: -5px;
width: 14px;
height: 14px;
cursor: pointer;
border-radius: 50%;
border: solid 2px #96dbfa;
background-color: #fff;
z-index: 2;
-webkit-transition: border-color 0.3s ease, -webkit-transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
transition: border-color 0.3s ease, -webkit-transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
transition: border-color 0.3s ease, transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
transition: border-color 0.3s ease, transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28), -webkit-transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}
.ant-slider-handle:hover {
border-color: #57c5f7;
-webkit-transform: scale(1.2);
-ms-transform: scale(1.2);
transform: scale(1.2);
-webkit-transform-origin: center center;
-ms-transform-origin: center center;
transform-origin: center center;
}
.ant-slider-handle:active {
box-shadow: 0 0 0 2px rgba(45, 183, 245, 0.2);
}
.ant-slider-mark {
position: absolute;
top: 10px;
left: 0;
width: 100%;
font-size: 12px;
z-index: 3;
}
.ant-slider-mark-text {
position: absolute;
display: inline-block;
vertical-align: middle;
text-align: center;
cursor: pointer;
color: #999;
}
.ant-slider-mark-text-active {
color: #666;
}
.ant-slider-step {
position: absolute;
width: 100%;
height: 4px;
background: transparent;
z-index: 1;
}
.ant-slider-dot {
position: absolute;
top: -2px;
margin-left: -4px;
width: 8px;
height: 8px;
border: 2px solid #e9e9e9;
background-color: #fff;
cursor: pointer;
border-radius: 50%;
vertical-align: middle;
}
.ant-slider-dot:first-child {
margin-left: -4px;
}
.ant-slider-dot:last-child {
margin-left: -4px;
}
.ant-slider-dot-active {
border-color: #96dbfa;
}
.ant-slider-disabled {
background-color: #e9e9e9 ;
}
.ant-slider-disabled .ant-slider-track {
background-color: #ccc ;
}
.ant-slider-disabled .ant-slider-handle,
.ant-slider-disabled .ant-slider-dot {
border-color: #ccc ;
background-color: #fff;
cursor: not-allowed;
}
.ant-slider-disabled .ant-slider-mark-text,
.ant-slider-disabled .ant-slider-dot {
cursor: not-allowed ;
}