1

我想用更多的文本文件创建 div:

<s:div cssClass="div_position">
  <s:textfield  cssClass="position" id="position1" value=""  name="position1" ></s:textfield>
  <s:textfield  cssClass="position" id="position2" value=""  name="position2" ></s:textfield>
  <s:textfield  cssClass="position" id="position3" value=""  name="position3" ></s:textfield>
  <s:textfield  cssClass="position" id="position4" value=""  name="position4" ></s:textfield>
  <s:textfield  cssClass="position" id="position5" value=""  name="position5" ></s:textfield>
</s:div>

“div_position”类如下:

.div_position{ height:50px; overflow-y:Scroll; }

它不起作用,我只显示文本字段但在 div 之外。有人可以帮助我。

4

1 回答 1

0

这对我有用

 <s:div cssClass="div_position" cssStyle="height:50px;overflow-y:scroll;">
<s:textfield  cssClass="position" id="position1" value=""  name="position1" ></s:textfield>
<s:textfield  cssClass="position" id="position2" value=""  name="position2" ></s:textfield><br>
<s:textfield  cssClass="position" id="position3" value=""  name="position3" ></s:textfield>
<s:textfield  cssClass="position" id="position4" value=""  name="position4" ></s:textfield><br>
<s:textfield  cssClass="position" id="position5" value=""  name="position5" ></s:textfield>
</s:div>

因为我已经配置了simple主题。像我一样做struts.xml

<constant name="struts.ui.theme" value="simple"/>
于 2013-05-05T13:17:15.657 回答