方式一:直接透明隐藏 .file_button_container,.file_button_container input {background: transparent url(./img/BT5AB.png) left top no-repeat;height: 47px;width: 263px;} .file_button_container {background: transparent url(./img/BT5AB.png) left top no-repeat;} .fil
input选择框是无法直接修改样式,我们只能间接来改变它样式. 原理:用图片来代替原来的input选择框,原来的input选择框定位到图片上方并让它opacity为0,鼠标点击时用js来改变图片,这样从视觉上就完成了input选择框样式的修改 HTML <i></i> <input type="checkbox" /> 我已阅读并接受<a href=""><***></a> CSS i { di
只用CSS美化选择框 2012-03-02 11:04 by iBlog, 26240 阅读, 14 评论, 收藏, 编辑 <本文译自Style a Select Box Using Only CSS> 当我需要用下拉列表拼凑自定义表单时,我常常不得不使用下拉框(select),由于某些部分是浏览器特定的,如下拉箭头,我花了一段时间去搞清楚如何只使用css轻松地美化下拉框. 下面是一个默认样式的下拉框的长相: Here is the first option The second option