zoukankan      html  css  js  c++  java
  • 小程序UI

    从input组件说起

    <input maxlength="10" placeholder="最大输入长度10" />
    <div id="wrapper" disabled$="{{disabled}}"> <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; 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; 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; }

    <loading hidden="{{hidden}}" bindchange="loadingChange">
    <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; 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; 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+CiAgICA8cmVjdCB4PSc0Ni41JyB5PSc0MCcgd2lkdGg9JzcnIGhlaWdodD0nMjAnIHJ4PSc1JyByeT0nNScgZmlsbD0nIzk4OTY5NycKICAgICAgICAgIHRyYW5zZm9ybT0ncm90YXRlKDMwIDUwIDUwKSB0cmFuc2xhdGUoMCAtMzApJz4KICAgICAgICAgICAgICAgICByZXBlYXRDb3VudD0naW5kZWZpbml0ZScvPgogICAgPC9yZWN0PgogICAgPHJlY3QgeD0nNDYuNScgeT0nNDAnIHdpZHRoPSc3JyBoZWlnaHQ9JzIwJyByeD0nNScgcnk9JzUnIGZpbGw9JyM5Qjk5OUEnCiAgICAgICAgICB0cmFuc2Zvcm09J3JvdGF0ZSg2MCA1MCA1MCkgdHJh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HJlY3QgeD0nNDYuNScgeT0nNDAnIHdpZHRoPSc3JyBoZWlnaHQ9JzIwJyByeD0nNScgcnk9JzUnIGZpbGw9JyNDQkNCQ0InCiAgICAgICAgICB0cmFuc2Zvcm09J3JvdGF0ZSgyNDAgNTAgNTApIHRyYW5zbGF0ZSgwIC0zMCknPgogICAgPC9yZWN0PgogICAgPHJlY3QgeD0nNDYuNScgeT0nNDAnIHdpZHRoPSc3JyBoZWlnaHQ9JzIwJyByeD0nNScgcnk9JzUnIGZpbGw9JyNEMkQyRDInCiAgICAgICAgICB0cmFuc2Zvcm09J3JvdGF0ZSgyNzAgNTAgNTApIHRyYW5zbGF0ZSgwIC0zMCknPgogICAgPC9yZWN0PgogICAgPHJlY3QgeD0nNDYuNScgeT0nNDAnIHdpZHRoPSc3JyBoZWlnaHQ9JzIwJyByeD0nNScgcnk9JzUnIGZpbGw9JyNEQURBREEnCiAgICAgICAgICB0cmFuc2Zvcm09J3JvdGF0ZSgzMDAgNTAgNTApIHRyYW5zbGF0ZSgwIC0zMCknPgogICAgPC9yZWN0PgogICAgPHJlY3QgeD0nNDYuNScgeT0nNDAnIHdpZHRoPSc3JyBoZWlnaHQ9JzIwJyByeD0nNScgcnk9JzUnIGZpbGw9JyNFMkUyRTInCiAgICAgICAgICB0cmFuc2Zvcm09J3JvdGF0ZSgzMzAgNTAgNTApIHRyYW5zbGF0ZSgwIC0zMCknPgogICAgPC9yZWN0Pgo8L3N2Zz4=) no-repeat; background-size: 100%; } .wx-loading-content { margin: 0 0 15px; } .wx-loading-mask { position: fixed; z-index: 1000; 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
    來源:简书
    简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。
  • 相关阅读:
    个人vim配置文件
    ORA-4031错误 解决方法
    HashMap在高并发下引起的死循环
    优先队列的应用
    java导入大量Excel时报错
    软件设计师必备——操作系统&#183;
    Java Security安全系列文档翻译笔记————KeyStore、密钥、证书、命令行实战
    能变成有钱人的五个金玉良言(转)
    c3p0链接池
    js中获取键盘事件
  • 原文地址:https://www.cnblogs.com/wcLT/p/9395808.html
Copyright © 2011-2022 走看看