css去掉select箭头的方法:首先创建一个HTML示例文件;然后通过select标签创建单选或多选菜单;最后通过“appearance:none;”等属性将默认的select选择框样式清除即可。
本文操作环境:windows7系统、HTML5&&CSS3版、Dell G3电脑。
css清除select的下拉箭头样式
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style> select::-ms-expand { display: none; } .info-select{ width: 88px; height: 25px; border: none; outline: none; /*将默认的select选择框样式清除*/ appearance:none; -moz-appearance:none; -webkit-appearance:none; -ms-appearance:none; /*在选择框的最右侧中间显示小箭头图片*/ background: url(img/sele.png) no-repeat scroll right center transparent; /***将sele.png替换为你的下拉箭头**/ } </style> </head> <body> <select class="info-select"> <option selected="selected">1</option> <option>2</option> </select> </body> </html>
【推荐学习:css视频教程】
本例可以更换selet下拉箭头,只适用于非ie浏览器,ie样式为默认样式
以上就是css怎么去掉select箭头的详细内容,更多请关注php中文网其它相关文章!
![php中文网最新课程二维码](/static/images/article_wechat2021.jpg?1111)
声明:本文原创发布php中文网,转载请注明出处,感谢您的尊重!如有疑问,请联系admin@php.cn处理
- 上一篇:javascript函数的写法有哪些
- 下一篇:css ul 不换行怎么实现
网友评论
文明上网理性发言,请遵守 新闻评论服务协议
我要评论