What's new
Apple iPad Forum 🍎

Welcome to the Apple iPad Forum, your one stop source for all things iPad. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

A strange question on ipad's safari

pandajj

iPF Noob
Joined
Feb 10, 2011
Messages
1
Reaction score
0
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

Top