How to remove the arrow from a select element in Firefox

后端 未结 30 1359
北恋
北恋 2020-11-22 15:58

I\'m trying to style a select element using CSS3. I\'m getting the results I desire in WebKit (Chrome / Safari), but Firefox isn\'t playing nicely (I\'m not ev

30条回答
  •  情话喂你
    2020-11-22 16:40

    /* Try this in FF30+ Covers up the arrow, turns off the background */ 
    /* still lets you style the border around the image and allows selection on the arrow */
    
    
    @-moz-document url-prefix() {
    
        .yourClass select {
            text-overflow: '';
            text-indent: -1px;
            -moz-appearance: none;
            background: none;
    
        }
    
        /*fix for popup in FF30 */
        .yourClass:after {
            position: absolute;
            margin-left: -27px;
            height: 22px;
            border-top-right-radius: 6px;
            border-bottom-right-radius: 6px;
            content: url('../images/yourArrow.svg');
            pointer-events: none;
            overflow: hidden;
            border-right: 1px solid #yourBorderColour;
            border-top: 1px solid #yourBorderColour;
            border-bottom: 1px solid #yourBorderColour; 
        }
    }
    

提交回复
热议问题