gpt4 book ai didi

c# - 为什么一个asp :DropDownList and a asp:TextBox of the same width appear differently

转载 作者:太空狗 更新时间:2023-10-29 13:06:47 24 4
gpt4 key购买 nike

我在表格中使用以下代码:

<tr>
<td>User Language:</td>
<td>
<asp:DropDownList ID="Language" runat="server" Width="200px">
<asp:ListItem Selected="True">English</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td><span class="important">*</span>Company:</td>
<td><asp:TextBox ID="Company" runat="server" width="200px" /></td>
</tr>

当代码出现在网站上时 <asp:Textbox>控件是 205px 和 <asp:DropDownList>是 200px 宽。是什么原因造成的?它们都设置为 200px 的宽度。

最佳答案

因为文本框有 2px 的边框和 1px 的边距。

关于c# - 为什么一个asp :DropDownList and a asp:TextBox of the same width appear differently,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2248421/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com