What's new

A strange question on ipad's safari

pandajj

iPF Noob
Code:
<!DOCTYPE HTML>
<html>
    <head>
        <title>form</title>
        <style type="text/css">
            .tel{
                -webkit-transition:all .3s ease-in-out;
                position:absolute;
                height:40px;
            }
        </style>
    </head>
    <body>
        <input type="text" id="tel" class="tel" style="top:10px"/>
        <s cript type="text/javascript">
            var input=document.getElementById("tel");
            input.onfocus=function(){
                input.style.top="50px";    
            }
            input.onblur=function(){
                input.style.top="10px";
            }
        </script>
    </body>
</html>
Hello, i meet a strange question today.
Those codes work fine on computer's safari. But when i try it on ipad's safari, the input's focus does not slide down with the text input element.
How can i fix it?
 

Most reactions

Latest posts

Back
Top