[img=http://b109.photo.store.qq.com/psb?/a44cf879-0bc5-47f8-ab7a-978f408b23c3/RGqOSZW7r0OBWastlQfcjOggsxTaDRU.i4vVZPE5psI!/b/dF*gBUF.AwAA&bo=ugByAO4!][ /img]
<select class="selguige" id="specId${st.index}" name="specId${st.index}" onchange="changeprice(${st.index},this.options[this.options.selectedIndex].value)"> <s:iterator value="#commodity.specList" id="spec" status="st2"> <option title="${spec.specName}" value="${spec.specid},${spec.salePrice},${spec.originalPrice}"style="font-size:10px;">${spec.specName}</option> </s:iterator> </select>
.selguige{ height:20px; margin-left:-1px; font-size: 12px; color: #3e3e3e; max-width: 100px; overflow:hidden; width:expression(this.offsetWidth > 100? "100px": this.offsetWidth + "px" ); _width: expression(this.offsetWidth > 100 ? "100px" : this.offsetWidth + "px"); }
In css, overflow: hiedden means that when the length is not enough, the content that cannot be displayed is automatically hidden. Remove the overflow or lengthen the width. ^
In CSS, overflow:hiedden means that when the length is not enough, the content that cannot be displayed is automatically hidden. Remove the overflow or lengthen the width^
The width cannot be added!
overflow:hiedden is still the same even after removing it!
After many experiments, I found that the settings you set in css cannot accommodate all characters. So you can reduce the font-size or increase the max-width.