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.
block要素の幅を決定する簡単な方法はありますinlineか? 要素を作成できないため、要素inlineの幅を決定してから幅を変更する方法が必要です。
block
inline
多面体の助けを借りてそれをやったようです。誰かがGoogleで見つけた場合のコードは次のとおりです。
$("h1").each(function() { $(this).css("display","inline").css({width: $(this).width(), display: "block"}); });