gpt4 book ai didi

c# - 在 IE8 中,chrome 下拉列表的宽度与下拉框的宽度相同,而在 IE9 中,下拉列表的宽度不同。如何修复?

转载 作者:行者123 更新时间:2023-11-28 07:21:57 26 4
gpt4 key购买 nike

 .inpTxtE
{
font: 11px verdana;
background-color:#FFFFFF;
border-right: #7F9DB9 1px solid;
border-top: #7F9DB9 1px solid;
border-left: #7F9DB9 1px solid;
border-bottom: #7F9DB9 1px solid;
width:70%;
}

但是当宽度为 72% 时,它与 IE9 中的其他宽度相同。但是当它在 chrome 下拉列表中打开时,宽度大于其他文本框。

  <asp:DropDownList ID="ddlStatus" runat="server" CssClass="inpTxtE" >
</asp:DropDownList>

这是我使用的代码。我将如何解决这个问题?

最佳答案

    <!DOCTYPE html>
<html>
<head>
<style type="text/css">
input, select {
width: 200px;
border: 1px solid #000;
padding: 0;
margin: 0;
height: 22px;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
input {
text-indent: 4px;
}
</style>
</head>
<body>
<input type="text" value="ABC"><br>
<select>
<option>1234567</option>
<option>121212121212121</option>
<option>12121212121212121212</option>
</select>
</body>
</html>

关于c# - 在 IE8 中,chrome 下拉列表的宽度与下拉框的宽度相同,而在 IE9 中,下拉列表的宽度不同。如何修复?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32044587/

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