如何在文本框的右侧显示图像,而不是左侧
我有一个asp文本框,我想把图像放在里面,通过下面的样式表我能把图像放在文本框内,但它放在左边。
I having a asp text box and i want to put image inside it, by below style sheet I able to put image inside textbox, but it put in left side.
问题:如何在右侧显示图片?
Question : how to show the image in right side?
.watermark
{
background-image: url('/Images/bt_dropdown.png') ;
background-repeat: no-repeat;
vertical-align: middle;
background-color: white;
}
<asp:TextBox ID="txtCombo" runat="server" ReadOnly="true" Width="200" Font-Size="X-Small" CssClass="watermark"></asp:TextBox>
在CSS中:
background-position:right;
这看起来像一个可用性问题。如果你要让教科书看起来像一个下拉/组合框,用户会希望它的行为像一个组合框(喜欢,能够点击箭头和选择一些东西)。你要实现某种JavaScript或可点击的功能吗?如果它将是一个标准的文本框,我建议避免与其他控制/输入类型的任何混淆。
This looks like a usability problem though. If you're going to make a textbook look like a dropdown/combobox, users are going to expect it to behave like a combobox (like, being able to click the arrow and choose something). Are you going to be implementing some kind of JavaScript or clickable feature? If it's going to be a standard textbox I recommend avoiding any confusion with other control/input types.