开发者

How to make icon to be displayed in the fixed place in my site?

开发者 https://www.devze.com 2023-03-18 18:19 出处:网络
I have fixed an icon in the place using jQuery $(\'#edit\').css({left:512}); When i make the browser size small or big开发者_JAVA技巧 the icon is not on the same place. It\'s moving according to t

I have fixed an icon in the place using jQuery

$('#edit').css({left:  512});

When i make the browser size small or big开发者_JAVA技巧 the icon is not on the same place. It's moving according to that current browser size.

How can it be controlled using jQuery to place icon in the same place even the browser size changes.


Why not using CSS instead of jQuery? Simply use fixed positioning.


In the css class put :

.logoClass { position : fixed; }


Try setting 'position :fixed;'

0

精彩评论

暂无评论...
验证码 换一张
取 消