UNPKG

jimu-mobile

Version:

积木组件库助力移动端开发

347 lines (338 loc) 9.12 kB
.jimu-picker { position: relative; } .jimu-picker > .container { position: fixed; box-sizing: border-box; -webkit-tap-highlight-color: transparent; z-index: 100; top: 0; left: -10000px; width: 100%; height: 100%; -webkit-transition: left 0ms cubic-bezier(0.23, 1, 0.32, 1) 450ms; -moz-transition: left 0ms cubic-bezier(0.23, 1, 0.32, 1) 450ms; transition: left 0ms cubic-bezier(0.23, 1, 0.32, 1) 450ms; .cell-bg{position: absolute;height: 2rem;bottom:0;left:0;width: 100%;background: #fff;z-index: 9;bottom: -2rem;} } .jimu-picker > .container.table { display: table !important; } .jimu-picker > .container.show { left: 0; -webkit-transition: left 0ms cubic-bezier(0.23, 1, 0.32, 1) 0ms; -moz-transition: left 0ms cubic-bezier(0.23, 1, 0.32, 1) 0ms; transition: left 0ms cubic-bezier(0.23, 1, 0.32, 1) 0ms; } .jimu-picker > .container .overlay { position: absolute; height: 100%; width: 100%; z-index: 9; top: 0; left: 0; opacity: 1; -webkit-tap-highlight-color: transparent; will-change: opacity; background-color: rgba(0, 0, 0, 0.54118); -webkit-transform: translateZ(0); -moz-transform: translateZ(0); -ms-transform: translateZ(0); -o-transform: translateZ(0); transform: translateZ(0); -webkit-transition: left 0ms cubic-bezier(0.23, 1, 0.32, 1) 0ms, opacity 400ms cubic-bezier(0.23, 1, 0.32, 1) 0ms; -moz-transition: left 0ms cubic-bezier(0.23, 1, 0.32, 1) 0ms, opacity 400ms cubic-bezier(0.23, 1, 0.32, 1) 0ms; transition: left 0ms cubic-bezier(0.23, 1, 0.32, 1) 0ms, opacity 400ms cubic-bezier(0.23, 1, 0.32, 1) 0ms; } @media screen and (max-width: 767px) { .jimu-picker > .container .overlay { background-color: rgba(0, 0, 0, .25); } } .jimu-picker > .container .cell { display: table-cell; vertical-align: middle; box-sizing: border-box; width: 100%; height: 100%; } @media screen and (max-width: 767px) { .jimu-picker > .container .cell { vertical-align: bottom; } } .jimu-picker > .container .popup { position: relative; box-sizing: border-box; -webkit-tap-highlight-color: transparent; -webkit-transition: all 450ms cubic-bezier(0.23, 1, 0.32, 1); -moz-transition: all 450ms cubic-bezier(0.23, 1, 0.32, 1); transition: all 450ms cubic-bezier(0.23, 1, 0.32, 1); width: 75%; height: 23.8rem; max-width: 95%; margin: 0 auto; z-index: 10; font-size: 1.2rem; color: #000; background-color:#fff; opacity: 0; } @media screen and (max-width: 767px) { .jimu-picker > .container .popup { width: 100%; max-width: 100%; height: 21.8rem; -webkit-transform: translate3d(0, 23.8rem, 0); -moz-transform: translate3d(0, 23.8rem, 0); -ms-transform: translate3d(0, 23.8rem, 0); -o-transform: translate3d(0, 23.8rem, 0); transform: translate3d(0, 23.8rem, 0); } } @media screen and (min-width: 768px) { .jimu-picker > .container .popup { -webkit-transform: translate3d(0, -64px, 0); -moz-transform: translate3d(0, -64px, 0); -ms-transform: translate3d(0, -64px, 0); -o-transform: translate3d(0, -64px, 0); transform: translate3d(0, -64px, 0); } } .jimu-picker > .container .popup .top{ height: 5rem; line-height: 5rem; font-size: 1.4rem; position: relative; } .jimu-picker > .container .popup .top:after{ content:"";position: absolute;height:1px;background:#e5e5e5;bottom: 1px;left:0;right:0;-webkit-transform: scaleY(.5);transform: scaleY(.5); } .jimu-picker > .container .popup .top .cancel{ float:left; padding-left:15px; color:#666 } .jimu-picker > .container .popup .top .ok{ float: right; color:#1E96FA; padding-right: 15px; } .jimu-picker > .container .popup .top .title{ position: absolute;top:0px;font-size: 1.6rem;left:50%;-webkit-transform: translate(-50%, 0);transform: translate(-50%, 0); } .jimu-picker > .container .popup.show { opacity: 1; top: 3rem; -webkit-transform: translate3d(0, 0, 0); -moz-transform: translate3d(0, 0, 0); -ms-transform: translate3d(0, 0, 0); -o-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } .jimu-picker > .container .popup:after { content: ' '; clear: both; display: table; } .jimu-picker > .container .popup .list-wrap { float: left; width: 100%; height: 100%; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; } .jimu-picker > .container .popup .list-wrap ul, .jimu-picker > .container .popup .list-wrap li { list-style-type: none; -webkit-overflow-scrolling : touch; margin: 0; padding: 0; } .jimu-picker > .container .popup .list-wrap ul { display: block; width: 100%; margin-top: 10.2rem; margin-bottom: 10.2rem; } @media screen and (max-width: 767px) { .jimu-picker > .container .popup .list-wrap ul { margin-top: 6.8rem; margin-bottom: 11.6rem; } } .jimu-picker > .container .popup .list-wrap li { text-align: center; line-height: 3.4rem; font-size: 1.6rem; cursor: pointer; /* transform: translateZ(0); -webkit-transform: translateZ(0);*/ } @media screen and (min-width: 768px) { .jimu-picker > .container .popup .list-wrap li:hover { background-color: rgba(255, 210, 96, 0.33); } } .jimu-picker > .container .popup > .cover { position: absolute; left: 0; right: 0; height: 10.2rem; box-sizing: border-box; z-index: 12; pointer-events: none; } .jimu-picker > .container .popup > .cover.upper { top: 5rem; /*border-bottom: .5px solid #e5e5e5;*/ } @media screen and (max-width: 767px) { .jimu-picker > .container .popup > .cover.upper { height: 6.8rem; background:-webkit-gradient(linear,left bottom,left top,from(hsla(0,0%,100%,.4)),to(hsla(0,0%,100%,.8))); } } .jimu-picker > .container .popup > .cover.lower { bottom: 0; /*border-top: .5px solid #e5e5e5;*/ background:-webkit-gradient(linear,left top,left bottom,from(hsla(0,0%,100%,.4)),to(hsla(0,0%,100%,.8))); } .jimu-picker > .container .popup > .cover.upper:before,.jimu-picker > .container .popup > .cover.lower:before{content:"";position: absolute;height:1px;background: #e5e5e5;left:0;width: 100%;-webkit-transform: scaleY(.5);transform: scaleY(.5);bottom:0;} .jimu-picker > .container .popup > .cover.lower:before{top:0;bottom:auto;} @media screen and (max-width: 767px) { .jimu-picker > .container .popup > .cover.lower { height: 6.6rem; //background:linear-gradient(transparent,#fff); } } .jimu-picker > .box { cursor: pointer; } @media screen and (max-width: 767px) { .jimu-picker > .box { box-sizing: border-box; line-height: 5rem; font-size: 1.32rem; color: #777777; } .jimu-picker > .box:after { content: ""; speak: none; font-style: normal; font-weight: normal; font-family: "icomoon"; -webkit-font-smoothing: antialiased; -webkit-text-stroke-width: 0.2px; font-size: 1.6rem; color: #bbb; margin-right: 0.6em; float: right; line-height: 5rem; } } @media screen and (min-width: 768px) { .jimu-picker > .box { border: 1px solid #e0e0e0; background-color: #f6f6f6; padding-left: 0.9rem; box-sizing: border-box; line-height: 3.2rem; font-size: 1.3rem; color: #525252; } .jimu-picker > .box:after { content: ""; speak: none; font-style: normal; font-weight: normal; font-family: "icomoon"; -webkit-font-smoothing: antialiased; -webkit-text-stroke-width: 0.2px; font-size: 2.2rem; color: #888; line-height: 3.2rem; text-align: center; padding: 0 0.6rem; float: right; background-color: #eaeaea; border-left: 1px solid #e0e0e0; } .jimu-picker > .box > label { font-size: 1.3rem; color: #525252; } } .list-area { margin-top: 5rem; } @media screen and (min-width: 768px) { .list-area { width: 500px; margin-left: auto; margin-right: auto; } } @media screen and (max-width: 767px) { .list-area > ul { border-bottom: 1px solid #e8e8e8; } .list-area > ul > li { position: relative; background-color: #fff; border-top: 1px solid #e8e8e8; padding: 0 1.6rem; } .list-area > ul > li:after { content: ' '; clear: both; display: table; } .list-area > ul > li > label { position: absolute; top: 0; left: 1.6rem; display: block; font-size: 1.32rem; line-height: 5rem; width: 7rem; color: #440f24; } .list-area > ul > li .edit { margin-left: 7rem; } } @media screen and (min-width: 768px) { .list-area > ul { padding: 1.8rem; } .list-area > ul > li { padding: 0.5rem 0; font-size: 1.3rem; } .list-area > ul > li:after { content: ' '; clear: both; display: table; } .list-area > ul > li > label { float: left; display: block; width: 6rem; margin-right: 1rem; padding: 1px; color: #898989; line-height: 3.2rem; } .list-area > ul > li .edit { overflow: hidden; margin-left: 7rem; padding: 1px; height: 3.3rem; } } .jimu-picker > .container .popup .list-wrap::-webkit-scrollbar{ width: 0px; height: 0px; background-color: transparent; }