时间:2010-07-23 15:38:06

标签: iphone animation webkit

1 个答案:

答案 0 :(得分:1)

这样的事情可以做你想要的,并且在iPhone 4上的Safari中运行得非常顺利:

<style type='text/css'>

    #element {

        position: absolute;
        top: 0px;
        left: 0px;
        -webkit-transition-property: top, left, bottom, right;
        -webkit-transition-duration: 300ms;
        -webkit-transition-timing-function: ease-in;

    }

</style>

<script type='text/javascript'>

    document.querySelector('#element').style.left = '300px';

</script>