【问题标题】:How to remove border and arrow in Select around arrow for mozilla browser如何在 Mozilla 浏览器的“选择周围箭头”中删除边框和箭头
【发布时间】:2017-02-28 03:56:35
【问题描述】:

我在我的 HTML 中使用了 select,它适用于其他浏览器,但我在 Mozilla 浏览器中的 select 内的箭头周围出现了一个带边框的框 有什么办法解决吗??我不希望它周围只有箭头这样的边界。 这是小提琴的链接https://jsfiddle.net/0zh3fa97/

HTML

<section class="quote-testimonail">
        <div class="container">
            <div class="row">
                <!-- Quotes Section Begins-->
                <div class="quote col-sm-6 col-md-6">
                    <h4 class="section-heading">quick quote</h4>
                    <div class="form-group clearfix col-sm-6 pad-0" style="margin-bottom: 20px">
                        <select class="form-control">
                            <option data-display="Fright Type">Air Frieght</option>
                            <option value="1">Road Frieght</option>
                            <option value="2">Ship Frieght</option>
                            <option value="3">Rail Frieght</option>
                        </select>
                    </div>
                    <div class="form-group col-sm-6 npr res-pad-0">
                        <label class="sr-only">Weight</label>
                        <input type="text" class="form-control" placeholder="Weight">
                    </div>
                    <div class="form-group col-sm-6 pad-0">
                        <label class="sr-only">Departure</label>
                        <input type="text" class="form-control" placeholder="Departure">
                    </div>
                    <div class="form-group col-sm-6 npr res-pad-0">
                        <label class="sr-only">Destination</label>
                        <input type="text" class="form-control" placeholder="Destination">
                    </div>
                    <div class="form-group">
                        <label class="sr-only">Email</label>
                        <input type="email" class="form-control" placeholder="Email">
                    </div>
                    <button class="btn">submit</button>
                </div>
                <!-- Quotes Secvtion Ends-->

                <!--TEstimonial Section Begins-->
                <div class="testimonial col-sm-6 col-md-6 npr">
                    <h4 class="section-heading">WHAT PEOPLE SAYS</h4>
                    <div id="carousel" class="carousel slide" data-ride="carousel">
                        <div class="carousel-inner">
                            <div class="item active">
                                <div class="testimonial-section">
                                    <i>Omnes platonem nam eu, ne lorem habemus eloquentiam cum, nam ex impetus voluptaria. Ut saepe conclusionemque his, vel veritus antiopam at. Eu errem lobortis complectitur has.</i> 
                                </div>
                                <div class="testimonial-section-name clearfix">
                                    <img width="70" height="70" src="../img/profile-img.jpg" alt="profile" class="img-circle pull-left">
                                    <div class="client-name">
                                        <h4>Steve jhonson</h4>
                                        <p>CEO,Ark foundation</p><p>        
                                        </p></div>
                                </div>
                            </div>
                            <div class="item">
                                <div class="testimonial-section">
                                    <i>Omnes platonem nam eu, ne lorem habemus eloquentiam cum, nam ex impetus voluptaria. Ut saepe conclusionemque his, vel veritus antiopam at. Eu errem lobortis complectitur has.</i> 
                                </div>
                                <div class="testimonial-section-name clearfix">
                                    <img width="70" height="70" src="../img/profile-img.jpg" alt="profile" class="img-circle pull-left">
                                    <div class="client-name">
                                        <h4>Steve jhonson</h4>
                                        <p>CEO,Ark foundation</p><p>        
                                        </p></div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- Testimonial Section ends-->
            </div>
        </div>
    </section>

CSS

/*Quotes and testimonial CSS*/
.quote-testimonail{
    padding: 100px 0;
    background-color: #191c30;
    position: relative;
}
.quote-testimonail:after{
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 50%;
    height: 100%;
    padding-left: 25px;
    background-image: url("../img/testimonial-bg.jpg");
    background-position: center center;
    background-size: cover;
}
.quote-testimonail h4.section-heading{
    color: #fff;
}

/*Quote CSS*/
.quote-testimonail .quote .form-group{
    margin-bottom: 20px;
}
.quote-testimonail .quote .form-group .form-control{
    border-radius: 0;
    height: 50px;
    color: #7d7d7d;
}

.quote-testimonail .quote .btn{
    height: 50px;
    width:180px;
    font-family: "arimo";
    font-weight: 700;
    font-size: 14px;
    border-radius: 0;
    border: none;
    text-transform: uppercase;
}
.quote-testimonail .container{
    margin: auto;
    padding: 0 15px;
}
.quote-testimonail .container .row{
    margin-left: -15px;
    margin-right: -15px;
}
.quote-testimonail .quote{
    padding-right: 30px;
    margin-bottom: 20px;

}

.quote-testimonail .quote h4{
    font-family: "arimo";
    font-size: 24px;
    font-weight: bold;
    padding-bottom: 45px;
}

/*Testimonial CSS*/
.quote-testimonail .testimonial{
    padding-left: 30px;
    z-index: 1;
}

.quote-testimonail .testimonial .carousel-inner .item .testimonial-section{
    height: auto;
    padding: 35px 35px 55px 35px;
    position: relative;
    font-size: 20px;
    color: #fff;
    font-family: inherit;
    font-weight: 300;
    border: 2px solid #fff;
    margin-right: 20px;
}

.quote-testimonail .testimonial .carousel-inner .item .testimonial-section-name{
    text-align: left;
    color: #fff;
    margin-top: 15px;
}
.quote-testimonail .testimonial .carousel-inner .item .testimonial-section-name img{
    height: 70px;
    width: 70px;
    margin-top: 15px;
    margin-right: 30px;
}
.quote-testimonail .testimonial .carousel-inner .item .testimonial-section-name .client-name{
    margin-top: 10px;
    color: #fff;
    text-transform: uppercase;
    font-family: "arimo";

}
.quote-testimonail .testimonial .carousel-inner .item .testimonial-section-name .client-name h4{
    font-size: 18px;
    padding-bottom: 5px;
}

请注意:我在小提琴中包含了外部 URI。 谢谢你

【问题讨论】:

  • background-image: url("../img/testimonial-bg.jpg"); 不工作(损坏的图像)请检查并更正
  • @Anant 我的问题不需要那个属性。所以我想如果你忽略背景图像的破碎图像问题会更好
  • 那一定是 shadowDOM,here 类似的问题可能会给出一些解释。

标签: javascript jquery html css cross-browser


【解决方案1】:

你可以添加这个: -moz-appearance:none;

select.form-control {
   -moz-appearance:none;
   -webkit-appearance: none;
   appearance:none;
   background-image: url('https://maxcdn.icons8.com/Share/icon/Arrows//expand_arrow1600.png');
   background-repeat: no-repeat;
   background-size:15px;
   background-position: right center;
}


select{
  width:150px;
}
<select class="form-control css-select">
<option data-display="Fright Type">Air Frieght</option>
<option value="1">Road Frieght</option>
<option value="2">Ship Frieght</option>
<option value="3">Rail Frieght</option>
</select>

【讨论】:

    【解决方案2】:

    如果你说的是蓝色边框,你可以试试这个:

    .form-control {
        border: 0;
        box-shadow: none !important;
    }
    

    【讨论】:

    • 不,不是蓝色边框。当我在 Mozilla 浏览器中运行时,选择框内的箭头周围的边框
    • @AnkurSahu 尝试搜索,但结果只显示如何隐藏它
    【解决方案3】:

    在此之前尝试通过此代码删除浏览器外观

    .your-class{
       -webkit-appearance: none;
       -moz-appearance:    none;
       appearance:         none;
    }

    【讨论】:

    • 这删除了选择框内的边框和箭头。 :(
    猜你喜欢
    • 1970-01-01
    • 2014-04-22
    • 2013-04-30
    • 2013-05-24
    • 2014-09-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-12-08
    相关资源
    最近更新 更多