网页放大缩小时,Dropdownlist显示不正常,但是刷新一下又正常了,这是怎么回事呢,求教
求求各位大侠了
你如果不想变化DropdownList控件的大小的话可以直接给它写CSS控制一下,这样当你网页变化的时候就不会变了!!
DropdownList是不是上设置的固定大小?
应该是你的css的问题,你是如何设置你的dropdownlist的?
<div class="content-tool" style="width:100%;"> <ul> <li style=" text-align:left; width:20%;"> <span style=" color:Red;">*</span><span>Library:</span><asp:DropDownList ID="dropLibrary" runat="server" Width="200px"> </asp:DropDownList> </li> <li style=" text-align:left; width:15%; "> <span style=" color:Red;">*</span><span>Period:</span><asp:DropDownList ID="dropPeriod" runat="server" ></asp:DropDownList> </li> <li style=" text-align:left;width:15%; "> <span style=" color:Red;">*</span><span>Region</span><asp:DropDownList ID="dropRegion" runat="server" ></asp:DropDownList> </li> <li style=" text-align:center;width:6%;"> <asp:ImageButton ID="btnSearch" runat="server" ImageUrl="../images/create.png" OnClientClick="if(!CheckRequried()) return false;" OnClick="btnSearch_Click" /> </li> <li style=" text-align:left; width:20%;"> <span style=" color:Red;"> *</span><span>Required field</span> <asp:DropDownList ID="dropDairyAccount" runat="server" Width="200px" Visible=false> </asp:DropDownList> </li> </ul> <div style=" clear:both;"> </div> </div>
我是这样设置的