@import '../../app.less'; .select.small { .select-warp { line-height: 22px; .button { line-height: 22px; padding: 0 14px; } } } .select.basic { .select-warp { line-height: 30px; } } .select { position: relative; text-align: center; display: inline-block; .mask { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 1; } .select-warp { position: relative; text-align: center; } .select-body { overflow: hidden; position: absolute; min-width: 100%; bottom: 0; left: 50%; background: #fff; border: 1px solid @line_color; border-radius: 4px; box-sizing: border-box; opacity: 0; z-index: 2; transform: translate(-50%, 100%); .select-option { height: 0; line-height: 25px; padding: 0 10px; border-bottom: 1px solid transparent; font-size: 12px; cursor: pointer; transition: all 0.3s; text-align: left; white-space: nowrap; } .select-option:hover { background: @theme_bg_color; } .select-option:last-child { border-bottom: none; } } .select-body.selected { opacity: 1; .select-option { height: auto; border-color: @line_color; } } .down-arrow { display: inline-block; position: relative; width: 16px; height: 16px; } .down-arrow::after { display: inline-block; content: " "; height: 8px; width: 8px; border-width: 2px 2px 0 0; border-color: #fff; border-style: solid; transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0); position: absolute; top: 50%; margin-top: -1px; } .up-arrow { display: inline-block; position: relative; width: 16px; height: 16px; } .up-arrow::after { display: inline-block; content: " "; height: 8px; width: 8px; border-width: 2px 2px 0 0; border-color: #fff; border-style: solid; transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0); position: absolute; top: 50%; margin-top: -1px; } &.white { cursor: pointer; .select-warp.active { background: rgba(241, 243, 246, 1); } .button { padding: 0 20px; border-radius: 0; background: none; color: #686872; } color: #686872; .select-body { border: none; } .select-option { text-align: center; border: none; } } .up-arrow::after { width: auto; height: auto; border-width: 5px; border-color: transparent transparent #8897a8 transparent; border-style: solid; transform: translateY(-4px); } .down-arrow::after { width: auto; height: auto; border-width: 5px; border-color: #8897a8 transparent transparent transparent; border-style: solid; transform: translateY(2px); } &.default { cursor: pointer; .up-arrow::after { width: auto; height: auto; border-width: 5px; border-color: transparent transparent #8897a8 transparent; border-style: solid; transform: translateY(-4px); } .down-arrow::after { width: auto; height: auto; border-width: 5px; border-color: #8897a8 transparent transparent transparent; border-style: solid; transform: translateY(2px); } .select-body { border: none; } .select-option { text-align: center; line-height: 30px; border: none; } } }