自定义select 小三角

把select小三角换成自己的图片

效果:

css样式:

<style>
        #my_select {
            display: flex;
            display: -webkit-flex;
            width: 120px;
            font-size: 24px;
            padding: 0 5px;
            margin: 20px auto;
            outline: none;
            border: 1px solid #00DD00;
            appearance: none;
            /* 兼容Chrome */
            -webkit-appearance: none;
            background: url(Images/xia.png) no-repeat right center;
            box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
            color: #FF5511;
        }
    </style>

HTML:

<body>
    <select name="" id="my_select">
        <option value="0">苹果</option>
        <option value="1">香蕉</option>
        <option value="2">橘子</option>
    </select>
</body>

  

posted @ 2018-10-23 10:16  冰雪Queen  阅读(1145)  评论(0编辑  收藏  举报