我的 aspx 文件中有一个 DropDownList,如下所示:
<asp:DropDownList runat="server" ID="MaxRec">
<asp:ListItem>10</asp:ListItem>
<asp:ListItem>50</asp:ListItem>
<asp:ListItem>100</asp:ListItem>
<asp:ListItem>150</asp:ListItem>
<asp:ListItem Selected="True">200</asp:ListItem>
</asp:DropDownList>
在 Chrome 中它呈现如下:
如何将所有 ListItems 的对齐方式设置为右侧,以便值正确对齐?
我尝试在 DropDownList 和 ListItems 上设置 style="text-align:right" 但没有任何效果。
我需要一个也适用的解决方案Chrome.
感谢您的回复!
添加以下样式将根据需要对齐数字,但会将下拉箭头移动到左侧而不是右侧。
除了使用这个之外,我认为无法右对齐选择选项可能是 Chrome 中的一个限制。
.drop-down-list
{
direction: rtl;
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)