重置Chrome(Mac)上的选择边框半径

时间:2016-10-07 12:12:20

标签: html css macos

我正在尝试重置chrome(Mac)中的border radius select CSS,但在应用我的border-radius后仍然显示,我如何重置select { padding: 10px; height: 50px; line-height: 50px; border-radius: 0; -webkit-border-radius:0; } in chrome(mac),它在Windows中运行良好,在Mac中运行fireFox。

这是JSFiddle



<select>
  <option>Option Title Goes here</option>
  <option>Option Title Goes here</option>
  <option>Option Title Goes here</option>
  <option>Option Title Goes here</option>
  <option>Option Title Goes here</option>
  <option>Option Title Goes here</option>
</select>
&#13;
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:stretchColumns="0">
<TableRow>
    <TextView
        android:id="@+id/tv_item_text"
        android:text="(123456) Item Name"
        android:paddingLeft="10dip"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_gravity="fill_vertical"
        android:gravity="fill_vertical"
        />
    <Button
        android:id="@+id/btn_go"
        android:layout_width="wrap_content"
        android:text="Go"
        android:textColor="@android:color/holo_blue_dark"
        android:layout_gravity="fill_vertical"
        android:gravity="center"
        android:visibility="visible" />
</TableRow>
&#13;
&#13;
&#13;

3 个答案:

答案 0 :(得分:5)

尝试将此添加到您的CSS中,然后根据您的需要选择样式。

-webkit-appearance: none;

答案 1 :(得分:1)

试试这个:

select {
    -webkit-appearance: none;
    -webkit-border-radius: 0px;
    background: url("arrow_image_url");
    background-position: 100% 50%;
    background-repeat: no-repeat;
}

使webkit-appearance“none”也会删除掉落箭头,您可以使用background属性设置它。

干杯!

答案 2 :(得分:1)

这看起来与Webkit版本相同,但没有边框半径。箭头使用Base64格式。

select {
    height: 19px;
    padding: 0 14px 0 8px; /* replace native select (has rounded edges on mac) */
    border-radius: 0;
    -webkit-appearance: none;
    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAWCAYAAAAW5GZjAAAMHmlDQ1BEaXNwbGF5AABIx62Xd1RTyRrA55YkJCS0QASkhN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