开发者

How can i position an a div with javascript in Safari?

I need to move a div with javascript. i've tried offsetTop/Left and I've tried style.top/left. but it doesnt work. style.top/left works in IE but not safari

document.getElementBy开发者_开发百科Id('links_safari').offsetTop= 20;
document.getElementById('links_safari').offsetLeft = 150;


Your question is tagged with jQuery, so using jQuery, I would suggest changing the margin CSS property.

$('#links_safari').css("margin-top", 20);
$('#links_safari').css("margin-left", 150);
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜