これは前の質問のフォローアップで、人々を混乱させていると思われるので、少し浄化します。ここにいくつかのマークアップがあります。jQueryを使用したプログラミングチャレンジ
<div class="button width120 height30 iconLeft colorRed"></div>
<div class="button width180 height20 iconPlus colorBlue"></div>
<div class="button width200 height10 iconStar colorGreen"></div>
<div class="button width110 height60 iconBack colorOrange"></div>
挑戦は以下のコードを記入することです。
$(".button").each(function(){
// Get the width from the class
// Get the height from the class
// Get the icon from the class
// Get the color from the class
});
さて、私はあなたがクラスをこのように使うべきではないことを知っているので、私はそれを行うための代替方法を探していないよ、これは実験であり、私はそれはそれを行うことは可能ですかどうかを知るために興味こちらです。
高さと幅は、可能性があるため、過剰 – tj111