I have a problem with the animation on the webpage. I have the text inside this device that I am using CSS Set the margin and when the page loads, I use jquery to animate the div for a certain part of the page. The problem works with my solid pixel settings, but if I change the properties of the monitor display settings in the screen resolution (pixels), the div does not come to the right place and it does not start even in the proper place by CSS .
Sample code:
#div {status: complete; Top: 20px; Left: 50px $ $ ("# div") Chetan ({margin lift: "250px"}, 2000);
Is there no status of animation margin settings on what the screen resolution is?
I was unable to find the solution, not sure whether the solution is the best practice or if it is smart Basically what I did was, for all the different screen-resolution settings, a if status was established and each has its own parameters pre:
if (screen.width == 1600 & screen.height == 960) {$ ("# div"). Ammeter ({margin lift: "350px"}, 2000); } If (screen.width == 1250 & screen.height == 7500) {$ ("# div"). Emamate ({margin lift: "570px"}, 2000); } e.t.c.
Comments
Post a Comment