UNPKG

zent

Version:

一套前端设计语言和基于React的实现

228 lines (194 loc) 5.28 kB
.zent-slider { display: -webkit-box; display: -ms-flexbox; display: flex; min-height: 30px; } .zent-slider-main { -webkit-box-flex: 1; -ms-flex: 1; flex: 1; margin: 8px 7px; height: 14px; cursor: pointer; position: relative; border-top: 5px solid #fff; border-bottom: 5px solid #fff; -webkit-box-sizing: border-box; box-sizing: border-box; } .zent-slider-main-with-marks { margin-bottom: 20px; } .zent-slider-main:hover .zent-slider-track { background: #38f; } .zent-slider-main:hover .zent-slider-track-disabled { background: #bbb } .zent-slider-main:hover .zent-slider-track-disabled:hover { background: #bbb; } .zent-slider-container { height: 4px; background: #e5e5e5; border-radius: 8px; position: absolute; width: 100%; } .zent-slider-track { height: 4px; background: #bdf; position: absolute; border-radius: 8px } .zent-slider-track:hover { background: #38f; } .zent-slider-track-disabled { background: #bbb; } .zent-slider-track-disabled:hover { background: #bbb; } .zent-slider-point { position: absolute; -webkit-box-sizing: border-box; box-sizing: border-box; width: 14px; height: 14px; margin-top: -5px; margin-left: -7px; border-radius: 50%; border: 2px solid #bdf; background-color: #fff; -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) } .zent-slider-point:hover { border-color: #38f; -webkit-transform: scale(1.2); transform: scale(1.2); -webkit-transform-origin: center center; transform-origin: center center; } .zent-slider-point:active { -webkit-box-shadow: 0 0 0 2px #eaf3ff; box-shadow: 0 0 0 2px #eaf3ff; } .zent-slider-point-disabled { border: 2px solid #cacaca; cursor: not-allowed; } .zent-slider-point-disabled:hover { border-color: #cacaca; -webkit-transform: scale(1.2); transform: scale(1.2); -webkit-transform-origin: center center; transform-origin: center center; } .zent-slider-point-disabled:active { -webkit-box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.2); box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.2); } .zent-slider-points { position: absolute; width: 100%; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } .zent-slider-toolTips { display: inline-block; position: absolute; } .zent-slider-toolTips .toolTips-content-hide { visibility: hidden; } .zent-slider-toolTips .toolTips-content { position: absolute; top: -33px; -webkit-transform: translateX(-50%); transform: translateX(-50%); } .zent-slider-toolTips .toolTips-content .toolTips-inner { padding: 4px 5px; background-color: #666; border-radius: 2px; font-size: 12px; color: #fff; line-height: 11px; position: relative; z-index: 2; } .zent-slider-toolTips .toolTips-content .toolTips-arrow { background: #666; -webkit-transform: translate(-50%, 50%) rotate(45deg); transform: translate(-50%, 50%) rotate(45deg); left: 50%; position: absolute; z-index: 1; top: 13px; width: 6px; height: 6px; -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); overflow: hidden; } .zent-slider-toolTips:hover .toolTips-content { visibility: visible; } .zent-slider-input { display: -webkit-box; display: -ms-flexbox; display: flex; margin-left: 15px; line-height: 30px; } .zent-slider-input .slider-input-line { padding: 0 5px; } .zent-slider-input .zent-input-wrapper { width: 60px; } .zent-slider-input .zent-input-wrapper .zent-input { min-width: 60px; } .zent-slider-marks { position: absolute; width: 100%; font-size: 12px; margin-top: 4px; color: #333; } .zent-slider-marks .zent-slider-mark { position: absolute; padding-top: 10px; -webkit-transform: translateX(-50%); transform: translateX(-50%); } .zent-slider-dots { position: absolute; width: 100%; } .zent-slider-dots .zent-slider-dot { position: absolute; display: inline-block; width: 6px; margin-top: -2px; -webkit-transform: translateX(-50%); transform: translateX(-50%); background-color: #fff; height: 6px; border: 1px solid #e5e5e5; border-radius: 50%; } .zent-slider-dots .zent-slider-dot-active { border: 1px solid #bdf; } .zent-slider-disabled .zent-slider-main { cursor: not-allowed; }