去除表单元素默认样式 |
您所在的位置:网站首页 › 你认为需要清除默认样式的元素有哪些内容 › 去除表单元素默认样式 |
去除表单元素默认样式
原创
奥特慢更快 2023-05-20 00:25:58 博主文章分类:CSS ©著作权 文章标签 css javascript html 一闪而过 垂直居中 文章分类 HarmonyOS 后端开发 ©著作权归作者所有:来自51CTO博客作者奥特慢更快的原创作品,请联系作者获取转载授权,否则将追究法律责任 input, textarea { outline:0; border:0; -webkit-appearance: none; -moz-appearance:none; appearance: none; line-height:normal; } // input::-webkit-input-placeholder{ // line-height: normal; //解决不垂直居中的问题 // } input::-webkit-input-placeholder{ line-height: normal; } input::-moz-placeholder{ line-height: normal; } input::-ms-input-placeholder{ line-height: normal; } select{ /*去除外边框*/ border: none; /*适应safari浏览器内容不跑偏*/ line-height: 1; width: 100%; /*将默认的select选择框样式清除*/ appearance:none; -moz-appearance:none; -webkit-appearance:none; /*在选择框的最右侧中间显示小箭头图片*/ background: url("~@/assets/images/btn_pulldown.png") right center/25px 10px no-repeat ; /*为下拉小箭头留出一点位置,避免被文字覆盖*/ padding-right: 30px; /*去除选中时样式*/ outline: none; /*去除点击一闪而过的灰色背景*/ -webkit-tap-highlight-color:rgba(0,0,0,0); }赞 收藏 评论 分享 举报 上一篇:flex 的 三个参数 flex:1 0 auto 下一篇:line-height |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |