简体   繁体   English

如何设置下拉选择框的下拉菜单样式?

[英]How to style drop downs of drop down select boxes?

How to style drop downs of drop down select boxes? 如何设置下拉选择框的下拉菜单样式?

I have created a jsfiddle http://jsfiddle.net/CGDhB/ 我创建了一个jsfiddle http://jsfiddle.net/CGDhB/

<div class="container">
    <div class="salmatWrapper">
        <div class="col-sm-12 contents">
            <img src="http://staging.serviceportal.com.au/service05/alinta/images/header.png" alt="Energy Unit Conversion Tool" class="img-responsive" />
            <div class="form">
                <form class="form-horizontal">
                    <fieldset>
                        <div class="col-xs-6 left">
                            <!-- Enter Value-->
                            <div class="form-group">
                                <div class="col-xs-12">
                                    <input id="custom1" name="custom1" type="text" placeholder="Enter Value" class="form-control input-md">
                                </div>
                            </div>
                            <!-- Convert From -->
                            <div class="form-group">
                                <div class="col-xs-12">
                                    <select id="custom2" name="custom2" class="form-control">
                                        <option value="" class="selectDefaultText">Convert From</option>
                                        <option value="1">Option one</option>
                                        <option value="2">Option two</option>
                                    </select>
                                </div>
                            </div>
                            <!-- Convert To -->
                            <div class="form-group">
                                <div class="col-xs-12">
                                    <select id="custom3" name="custom3" class="form-control">
                                        <option value="" class="selectDefaultText">Convert To</option>
                                        <option value="1">Option one</option>
                                        <option value="2">Option two</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-6 right">
                            <!-- Textarea -->
                            <div class="form-group">
                                <div class="col-xs-12">
                                    <textarea class="form-control" id="custom4" name="custom4">Result here ...</textarea>
                                </div>
                            </div>
                        </div>
                    </fieldset>
                </form>
            </div>
            <div class="col-sm-12">
                <img src="http://staging.serviceportal.com.au/service05/alinta/images/footer.png" alt="Check our affordable electrity and gas packages!" class="img-responsive" />
            </div>
        </div>
    </div>
</div>

I want the drop downs to look as in below image 我希望下拉菜单如下图所示

在此处输入图片说明

Basically I want that little icon and the drop down select boxes to look as that. 基本上,我希望该小图标和下拉选择框看起来像那样。 I am confused with this. 我对此感到困惑。 A staging link may be viewed from here http://bit.ly/1eNm3jv 可以从此处http://bit.ly/1eNm3jv查看暂存链接

You really can't style select. 您真的无法样式选择。 The only thing you can really do is border color and padding as far as I know. 据我所知,您唯一能做的就是边框颜色和填充。 Probably font size as well. 大概是字体大小。 Like @setek mentioned, gonna have to use some kind of plugin. 就像提到的@setek一样,必须使用某种插件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM