把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="" >
        <option value="0">苹果</option>
        <option value="1">香蕉</option>
        <option value="2">橘子</option>
    </select>
</body>

  

相关文章:

  • 2022-12-23
  • 2022-01-10
  • 2022-12-23
  • 2022-12-23
  • 2021-08-11
猜你喜欢
  • 2021-05-25
  • 2022-12-23
  • 2021-11-23
  • 2021-07-03
  • 2021-05-26
  • 2021-04-09
相关资源
相似解决方案