Remove border radius from Select tag in bootstrap 3

前端 未结 6 426
离开以前
离开以前 2020-11-30 17:45

This seems like a trivial problem, but I can\'t figure it out.

On Bootstraps own website they have the Select example.

6条回答
  •  有刺的猬
    2020-11-30 18:41

    Using the SVG from @ArnoTenkink as an data url combined with the accepted answer, this gives us the perfect solution for retina displays.

    select.form-control:not([multiple]) {
        border-radius: 0;
        appearance: none;
        background-position: right 50%;
        background-repeat: no-repeat;
        background-image: url(data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%20%3C%21DOCTYPE%20svg%20PUBLIC%20%22-//W3C//DTD%20SVG%201.1//EN%22%20%22http%3A//www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd%22%3E%20%3Csvg%20version%3D%221.1%22%20id%3D%22Layer_1%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%20x%3D%220px%22%20y%3D%220px%22%20width%3D%2214px%22%20height%3D%2212px%22%20viewBox%3D%220%200%2014%2012%22%20enable-background%3D%22new%200%200%2014%2012%22%20xml%3Aspace%3D%22preserve%22%3E%20%3Cpolygon%20points%3D%223.862%2C7.931%200%2C4.069%207.725%2C4.069%20%22/%3E%3C/svg%3E);
        padding: .5em;
        padding-right: 1.5em
    }
    

提交回复
热议问题