3

asp.netのドロップダウンリスト表示で矢印を削除するにはどうすればよいですか。自分の画像を使用してドロップダウンリストの見栄えを良くしたいので、矢印は必要ありません。

 <asp:DropDownList ID="cboLang" Runat="server" AutoPostBack="True" onselectedindexchanged="cboLang_SelectedIndexChanged" Font-Size="XX-Small" Width="95" Height="26" >
                        <asp:ListItem Value="EN-US">ENGLISH</asp:ListItem>
                        <asp:ListItem Value="ZH-CN">&#20013;&#25991;</asp:ListItem>
                        <asp:ListItem Value="TH-TH">&#3616;&#3634;&#3625;&#3634;&#3652;&#3607;&#3618;</asp:ListItem>
                        <asp:ListItem Value="EN-IE">ti&#7871;ng Vi&#7879;t</asp:ListItem>
                        <asp:ListItem Value="EN-TT">Korean</asp:ListItem>
                        <asp:ListItem Value="EN-AU">Indo</asp:ListItem>
                        </asp:DropDownList>
4

3 に答える 3

4

次のように、ドロップダウンcssClass="select"にcssClassを追加できます。

<asp:DropDownList ID="cboLang" Runat="server" cssClass="select" AutoPostBack="True" onselectedindexchanged="cboLang_SelectedIndexChanged" Font-Size="XX-Small" Width="95" Height="26" >
                    <asp:ListItem Value="EN-US">ENGLISH</asp:ListItem>
                    <asp:ListItem Value="ZH-CN">&#20013;&#25991;</asp:ListItem>
                    <asp:ListItem Value="TH-TH">&#3616;&#3634;&#3625;&#3634;&#3652;&#3607;&#3618;</asp:ListItem>
                    <asp:ListItem Value="EN-IE">ti&#7871;ng Vi&#7879;t</asp:ListItem>
                    <asp:ListItem Value="EN-TT">Korean</asp:ListItem>
                    <asp:ListItem Value="EN-AU">Indo</asp:ListItem>
                    </asp:DropDownList>

ヘッドタグに次のスタイルを追加します

<style>
.select
{
    border-radius: 5px;
   -webkit-appearance: none;
}
</style>
于 2014-08-15T21:58:16.347 に答える
2

asp.netドロップダウンコントロールでは実行できません。その場所でオートコンプリートテキストボックスを使用できます。telerikコンボボックスで矢印を隠すことも可能です。

于 2012-12-14T11:23:50.873 に答える
-1

タグのレンダリング方法を変更する<select>ことはできません。他の方法を使用して、オートコンプリートテキストボックスとして複数の値を表示できます。

これらのリンクを確認してください:

ドロップダウンメニューからドロップダウン(選択)ボタンを削除しますか?

<select>要素からドロップダウン矢印を削除しますか?

于 2012-12-14T11:28:22.320 に答える