Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <script src="http://code.jquery.com/jquery-1.11.2.min.js"></script>
- <script>
- $(document).ready(function(){
- var s = $('.a').css('left',40).css('left');
- $('.a').html(s);
- });
- </script>
- <style>
- .container {
- position:relative;
- width:300px;
- height:300px;
- background-color:yellow;
- padding:20px
- }
- .a {
- padding:40px;
- position:absolute;
- background-color:red;
- width:100px;
- height:100px;
- color:black;
- left:auto;
- transition:all 1s ease
- }
- </style>
- </head>
- <body>
- <div class='container'>
- <div class='a'></div>
- </div>
- </body>
- </html>
- $('.a').css('left', '40px');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement