简体   繁体   English

如何使用CSS设置迭代器的特定样式

[英]how to style specific run through of an iterator using css

I have this iterator on one of my pages is there a way I can style a certain run through of the iterator such as making the first run through in a container 400 by 200px and the next run through in a different container around 200 by 200px? 我在我的一个页面上有此迭代器,是否可以通过某种方式设置迭代器的特定游程样式,例如使第一个游程在400 x 200像素的容器中运行,然后在200 x 200像素左右的另一个容器中运行?

<s:iterator value="walkthroughs">
    <div>
        <span>
            <s:property default="fail" value="_walkthroughText"/>
        </span> 
     </div> 
</s:iterator>

From the iterator tag documentation : 迭代器标签文档中

status - If specified, an instanceof IteratorStatus will be pushed into stack upon each iteration status-如果指定,则每次迭代时都会将IteratorStatus的实例推入堆栈

For example: 例如:

<s:iterator value="#it.days" status="rowstatus">
  <tr>
    <s:if test="#rowstatus.odd == true">
      <td style="background: grey"><s:property/></td>
    </s:if>
    <s:else>
      <td><s:property/></td>
    </s:else>
  </tr>
</s:iterator>

Here is the Javadoc of IteratorStatus . 这是IteratorStatus的Javadoc

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM