Sil*_*ght 1 javascript css jquery
为什么下面的JQuery语法不正确:
$('#Footer').css({ right: 6%, bottom: 0 });
Run Code Online (Sandbox Code Playgroud)
这个是:
$('#Footer').css('right', '6%');
$('#Footer').css('bottom', '0');
Run Code Online (Sandbox Code Playgroud)
第一个代码中有什么不正确?
提前致谢
6% 不是数字,因此必须将其指定为字符串.
$('#Footer').css({ right: '6%', bottom: 0 });
Run Code Online (Sandbox Code Playgroud)