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.
div の幅を変更しようとしています。私は何を間違っていますか?
$('#foo') [<div class="bar" id="foo" style="width: 40%"></div>] $('#foo').css('style','width:50%') [<div class="bar" id="foo" style="width: 40%"></div>]
そうあるべきだと思う
$('#foo').css('width','50%')
実際には、次の 2 つの方法のいずれかに従うことができます。
または
$('#foo').css({width:'50%'})
2 番目の方法は、複数のプロパティを一度に変更するために使用されます。