jquery css中的百分比定位

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)

第一个代码中有什么不正确?

提前致谢

kap*_*apa 8

6% 不是数字,因此必须将其指定为字符串.

$('#Footer').css({ right: '6%', bottom: 0 });  
Run Code Online (Sandbox Code Playgroud)