zoukankan      html  css  js  c++  java
  • 前端坑

    web网页input框设置,点击input框弹出键盘,再收回键盘,焦点框会随页面滚动

    .x-input-el {
    display: block;
    /*add:防止闪屏*/
    -webkit-user-modify: read-write-plaintext-only
    }
    在css里边找到.x-input-el
    把下边-webkit-user-modify: read-write-plaintext-only
    这句添加上,就ok了。

    H5输入框input的坑
    <span style="font-size:18px;"><input type="number" id="typeBox" name="phone" required ></span>
    [html] view plain copy
    <span style="font-size:18px;">
    </span>
    [html] view plain copy
    <span style="font-size:18px;">JS</span>
    [html] view plain copy
    <span style="font-size:18px;">
    </span>
    [html] view plain copy
    <pre name="code" class="javascript"><span style="font-size:18px;">var bodyH = document.body.clientHeight;
    var type = document.getElementById('typeBox');
    var fif = document.getElementById('fip');
    type.addEventListener("focus",function() {
    fif.style.top = 0 + "px";
    fif.style.height = bodyH + "px";
    });
    type.addEventListener("blur",function() {
    fif.style.top = 0 + "px";
    fif.style.height = bodyH + "px";
    });</span>

  • 相关阅读:
    lr http_get访问webservice
    lr http_post请求webservice
    快速幂(fast power)
    运算符重载
    1010 Radix 二分
    1054 The Dominant Color
    1042 Shuffling Machine
    1059 Prime Factors
    1061 Dating
    1078 Hashing
  • 原文地址:https://www.cnblogs.com/qq735675958/p/8477796.html
Copyright © 2011-2022 走看看