在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
从input组件说起
<div id="wrapper" disabled$="{{disabled}}">\n <p id="placeholder" class$="{{_getPlaceholderClass(placeholderClass)}}" style$="{{placeholderStyle}}" parse-text-content>{{placeholder}} </p> <input id="input" type$="{{_getType(type,password)}}" maxlength$="{{maxlength}}" value$="{{showValue}}" disabled$="{{disabled}}" > </div>
wx-input { height: 1.4rem; display: -webkit-box; display: -ms-flexbox; display: flex; text-overflow: clip; overflow: hidden; white-space: nowrap; font-family: UICTFontTextStyleBody; min-height: 1.4rem; } wx-input input { min-height: 1.4rem; -webkit-box-flex: 1; -ms-flex: 1; flex: 1; border: none; height: inherit; width: inherit; font-size: inherit; font-weight: inherit; font-family: UICTFontTextStyleBody; color: inherit; background: inherit; display: inherit; padding: 0; margin: 0; outline: none; vertical-align: middle; text-align: inherit; overflow: inherit; white-space: inherit; text-overflow: inherit; -webkit-tap-highlight-color: transparent; } wx-input[disabled] p { color: grey; } wx-input div { min-height: 1.4rem; -webkit-box-flex: 1; -ms-flex: 1; flex: 1; text-overflow: inherit; border: none; height: inherit; width: inherit; font-size: inherit; font-weight: inherit; font-family: UICTFontTextStyleBody; color: inherit; background: inherit; display: -webkit-box; display: -ms-flexbox; display: flex; padding: 0; margin: 0; outline: none; text-align: inherit; -webkit-tap-highlight-color: transparent; } wx-input div[type=password] p { color: black; } wx-input div p { height: inherit; min-height: 1.4rem; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; text-overflow: inherit; white-space: nowrap; overflow: hidden; vertical-align: middle; }
<div class="wx-loading-mask" style$="background-color: transparent;"></div> <div class="wx-loading"> <i class="wx-loading-icon"></i> <p class="wx-loading-content"><wx-content></wx-content> </p> </div>
.wx-loading { position: fixed; z-index: 2000000000; width: 7.6em; min-height: 7.6em; top: 180px; left: 50%; margin-left: -3.8em; background: rgba(40, 40, 40, 0.75); text-align: center; border-radius: 5px; color: #FFFFFF; font-size: 16px; line-height: normal; } .wx-loading-icon { margin: 30px 0 10px; width: 38px; height: 38px; vertical-align: baseline; display: inline-block; -webkit-animation: weuiLoading 1s steps(12, end) infinite; animation: weuiLoading 1s steps(12, end) infinite; background: transparent url(data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iciIgd2lkdGg9JzEyMHB4JyBoZWlnaHQ9JzEyMHB4JyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTAwIj4KICAgIDxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAiIGhlaWdodD0iMTAwIiBmaWxsPSJub25lIiBjbGFzcz0iYmsiPjwvcmVjdD4KICAgIDxyZWN0IHg9JzQ2LjUnIHk9JzQwJyB3aWR0aD0nNycgaGVpZ2h0PScyMCcgcng9JzUnIHJ5PSc1JyBmaWxsPScjRTlFOUU5JwogICAgICAgICAgdHJhbnNmb3JtPSdyb3RhdGUoMCA1MCA1MCkgdHJhbnNsYXRlKDAgLTMwKSc+CiAgICA8L3JlY3Q+CiAgICA8cmVjdCB4PSc0Ni41JyB5PSc0MCcgd2lkdGg9JzcnIGhlaWdodD0nMjAnIHJ4PSc1JyByeT0nNScgZmlsbD0nIzk4OTY5NycKICAgICAgICAgIHRyYW5zZm9ybT0ncm90YXRlKDMwIDUwIDUwKSB0cmFuc2xhdGUoMCAtMzApJz4KICAgICAgICAgICAgICAgICByZXBlYXRDb3VudD0naW5kZWZpbml0ZScvPgogICAgPC9yZWN0PgogICAgPHJlY3QgeD0nNDYuNScgeT0nNDAnIHdpZHRoPSc3JyBoZWlnaHQ9JzIwJyByeD0nNScgcnk9JzUnIGZpbGw9JyM5Qjk5OUEnCiAgICAgICAgICB0cmFuc2Zvcm09J3JvdGF0ZSg2MCA1MCA1MCkgdHJhbnNsYXRlKDAgLTMwKSc+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0nNDAnIHdpZHRoPSc3JyBoZWlnaHQ9JzIwJyByeD0nNScgcnk9JzUnIGZpbGw9JyNDQkNCQ0InCiAgICAgICAgICB0cmFuc2Zvcm09J3JvdGF0ZSgyNDAgNTAgNTApIHRyYW5zbGF0ZSgwIC0zMCknPgogICAgPC9yZWN0PgogICAgPHJlY3QgeD0nNDYuNScgeT0nNDAnIHdpZHRoPSc3JyBoZWlnaHQ9JzIwJyByeD0nNScgcnk9JzUnIGZpbGw9JyNEMkQyRDInCiAgICAgICAgICB0cmFuc2Zvcm09J3JvdGF0ZSgyNzAgNTAgNTApIHRyYW5zbGF0ZSgwIC0zMCknPgogICAgPC9yZWN0PgogICAgPHJlY3QgeD0nNDYuNScgeT0nNDAnIHdpZHRoPSc3JyBoZWlnaHQ9JzIwJyByeD0nNScgcnk9JzUnIGZpbGw9JyNEQURBREEnCiAgICAgICAgICB0cmFuc2Zvcm09J3JvdGF0ZSgzMDAgNTAgNTApIHRyYW5zbGF0ZSgwIC0zMCknPgogICAgPC9yZWN0PgogICAgPHJlY3QgeD0nNDYuNScgeT0nNDAnIHdpZHRoPSc3JyBoZWlnaHQ9JzIwJyByeD0nNScgcnk9JzUnIGZpbGw9JyNFMkUyRTInCiAgICAgICAgICB0cmFuc2Zvcm09J3JvdGF0ZSgzMzAgNTAgNTApIHRyYW5zbGF0ZSgwIC0zMCknPgogICAgPC9yZWN0Pgo8L3N2Zz4=) no-repeat; background-size: 100%; } .wx-loading-content { margin: 0 0 15px; } .wx-loading-mask { position: fixed; z-index: 1000; width: 100%; height: 100%; top: 0; left: 0; } @-webkit-keyframes weuiLoading { 0% { -webkit-transform: rotate3d(0, 0, 1, 0deg); } 100% { -webkit-transform: rotate3d(0, 0, 1, 360deg); } } @keyframes weuiLoading { 0% { -webkit-transform: rotate3d(0, 0, 1, 0deg); } 100% { -webkit-transform: rotate3d(0, 0, 1, 360deg); } }
作者:Sumer 链接:https://www.jianshu.com/p/f9312a98ff10 來源:简书 简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。 作者:Sumer 链接:https://www.jianshu.com/p/f9312a98ff10 來源:简书 简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。 |
请发表评论