Home  >  Article  >  Web Front-end  >  How to remove select arrow in css

How to remove select arrow in css

藏色散人
藏色散人Original
2021-04-12 14:32:082470browse

How to remove the select arrow in css: first create an HTML sample file; then create a single-select or multi-select menu through the select tag; finally clear the default select box style through attributes such as "appearance:none;" That’s it.

How to remove select arrow in css

The operating environment of this article: Windows7 system, HTML5&&CSS3 version, Dell G3 computer.

css clear select drop-down arrow style

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
        <style>
        select::-ms-expand { display: none; }          
         .info-select{
            width: 88px;
            height: 25px;
            border: none;
            outline: none;
            /*将默认的select选择框样式清除*/
            appearance:none;
            -moz-appearance:none;
            -webkit-appearance:none;
            -ms-appearance:none;
           /*在选择框的最右侧中间显示小箭头图片*/
           background: url(img/sele.png) no-repeat scroll right center transparent;     
           /***将sele.png替换为你的下拉箭头**/      
         }
        </style>
    </head>
    <body>
        <select class="info-select">
            <option selected="selected">1</option>
            <option>2</option>
        </select>
    </body>
</html>

[Recommended learning: css video tutorial]

This example can replace the selet drop-down arrow, only applicable For non-IE browsers, the IE style is the default style

The above is the detailed content of How to remove select arrow in css. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn