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 id="ball"> </div>
创造
<div class="grass"> <div id="ball"> </div> </div>
我曾尝试使用 jQuery,但无法使其正常工作。
使用 jQuery 的wrap:
$('#ball').wrap('<div class="grass" />');