Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有人可以告诉我(并记住我只是在玩),为什么这不起作用:
$('.radio input[type="radio"]').css('margin-top', '-5px');
我想要它做的只是将带有assign css属性的单选框向上移动-5px。但它不会这样做。我已经在网上看到过这样的例子,你可以通过这种方式向 CSS 对象添加属性。
你试过这个吗?
$('input[type="radio"]').css('margin-top', '-5px');