鍍金池/ 問答/Java  PHP  Python  C  HTML/ 為什么input在手機(jī)模式下,點(diǎn)擊的時(shí)候會(huì)閃一下,我用背景代替了效果,如下圖代碼

為什么input在手機(jī)模式下,點(diǎn)擊的時(shí)候會(huì)閃一下,我用背景代替了效果,如下圖代碼

clipboard.png

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"/>
    <title></title>
    <link rel="stylesheet" href="css/reset.css"/>
    <link rel="stylesheet" href="css/app.css"/>
    <style>
        html, body {
            height: 100%;
            background-color: #f4f4f4;
        }

        input[type="radio"] {
            display: none;
            outline: none;
            apperance:none;
            -webkit-appearance: none;
        }
        label{
            width: 0.3rem;
            height: 0.3rem;
            display: inline-block;
            cursor: pointer;
        }
        label input[type="radio"] + span{
            width: 0.3rem;
            height: 0.3rem;
            display: inline-block;
            background: url(image/my_set_sex.png) no-repeat 0 0/0.3rem 0.3rem;
        }
        label input[type="radio"]:checked + span{
            background: url(image/my_set_sex_chedked.png) no-repeat 0 0/0.3rem 0.3rem;
        }
    </style>
    <script>document.documentElement.style.fontSize = document.documentElement.clientWidth / 7.5 + 'px';</script>
</head>
<body>
<header class="app-header">
    <div class="header-left">
        <p class="my-set-left">取消</p>
    </div>
    <div class="header-center">設(shè)置姓名</div>
    <div class="header-right">
        <p class="my-set-right">完成</p>
    </div>
</header>
<!--個(gè)人信息-->
<section class="app-my-set">
    <div class="set-item">男<label><input name="sex" type="radio" value="男" checked/><span></span></label></div>
    <div class="set-item">女 <label><input name="sex" type="radio" value="女"/><span></span></label></div>
</section>
</body>
</html>
回答
編輯回答
扯不斷

你css加個(gè)這個(gè)試試-webkit-tap-highlight-color:transparent;

2018年5月5日 19:10