美化select图标,自定义select右侧下图标

select标签右侧的小图标在不同浏览器呈现的样式不同,如果要改成自己选的图标可用以下方法:

在火狐浏览器的默认样式如下:


select{
appearance: none; /* 去掉默认图标 */
-moz-appearance: none; /* Firefox */
-webkit-appearance: none; /* Safari and Chrome */
padding:0 20px 0 5px;
background: url("../../Images/S/select.png") no-repeat scroll right center transparent ;/* 自己的图*/

/* 以下是圆角和边框等其他设置: */
width:24%;
height:28px;
line-height:28px;
border:1px solid #b3b3b3;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
padding:0 20px 0 5px;
}

修改后样式如下:


猜你喜欢

转载自blog.csdn.net/qq_36376116/article/details/79138324