UNPKG

hg-citypicker

Version:

a citypicker in the mobile terminal

125 lines (109 loc) 2.42 kB
.hg-picker-bg { position: fixed; top: 0; left: 0; bottom: 0; right: 0; background: rgba(70, 70, 70, 0); overflow: hidden; transition: all .3s ease; -webkit-transition: all .3s ease; z-index: -1; } .hg-picker-bg-show { z-index: 99 !important; background: rgba(70, 70, 70, 0.65) !important; } .hg-picker-container { width: 100%; height: 244px; position: absolute; bottom: 0; transform: translate3d(0, 101%, 0); -webkit-transform: translate3d(0, 101%, 0); left: 0; background-color: #FFF; transition: transform .3s ease; -webkit-transition: -webkit-transform .3s ease; z-index: -1; } .hg-picker-container-up { transform: translate3d(0, 0, 0) !important; -webkit-transform: translate3d(0, 0, 0) !important; } .hg-picker-btn-box { text-align: center; height: 44px; line-height: 44px; background: #f0f0f0; } .hg-picker-btn { color: #000; } .hg-picker-btn:nth-child(1) { margin-left: 20px; float: left; } .hg-picker-btn:nth-child(2) { margin-right: 20px; float: right; } .hg-picker-content { background: #fff; overflow: hidden; position: relative; height: 200px; line-height: 40px; width: 100%; } .hg-picker-content ul { display: inline-block; overflow: hidden; position: relative; top: 0; vertical-align: top; } .hg-picker-content ul::-webkit-scrollbar { display: none; } .hg-picker-content li { height: 40px; text-align: center; font-size: 16px; list-style: none; overflow: hidden; } .hg-picker-up-shadow, .hg-picker-down-shadow { height: 80px; width: 100%; position: absolute; pointer-events: none; } .hg-picker-up-shadow { top: 0; background-image: linear-gradient(180deg, rgb(255, 255, 255) 0%, rgba(255, 255, 255, 0.6) 50%, rgba(255, 255, 255, 0.5) 80%, rgba(255, 255, 255, 0) 100%); } .hg-picker-down-shadow { bottom: 0; background-image: linear-gradient(0deg, rgb(255, 255, 255) 0%, rgba(255, 255, 255, 0.6) 50%, rgba(255, 255, 255, 0.5) 80%, rgba(255, 255, 255, 0) 100%); } .hg-picker-line { width: 96%; height: 40px; position: absolute; top: 80px; left: 2%; pointer-events: none; box-sizing: border-box; border-top: 1px solid #DCDCDC; border-bottom: 1px solid #DCDCDC; }