0

禅スニペットがあるとします。

div#container>(div.panel>h2{this is the header inside panel $})*3

次のように評価されます。

<div id="container">
    <div class="panel">
        <h2>this is the header inside panel 1</h2>
    </div>
    <div class="panel">
        <h2>this is the header inside panel 1</h2>
    </div>
    <div class="panel">
        <h2>this is the header inside panel 1</h2>
    </div>
</div>

乗算された要素のインデックスをその子に渡すことを評価させる方法はありますか?

ありがとう。

4

1 に答える 1

0

これは、Zen コーディング コアの現在のバージョンのバグです。グループが繰り返されると、カウンター値が正しく設定されません。ただし、この特定のケースでは、次の略語を使用して目的の結果を得ることができます。

div#container>div.panel*3>h2{this is the header inside panel $}

次の v0.8 リリースでは、このバグが修正されました。ここでテストできます: http://media.chikuyonok.ru/codemirror2/

于 2012-08-06T14:17:11.367 に答える