css - 试图使 OutlinedInput 具有透明边框,但得到奇怪的伪影
问题描述
尝试创建带有透明边框的轮廓变体 TextField select。我拥有的当前主题覆盖如下:
overrides: {
MuiOutlinedInput: {
root: {
backgroundColor: '#F4F4F4',
borderRadius: 8,
height: 56
},
notchedOutline: {
borderColor: 'transparent !important',
borderRadius: 8,
borderWidth: '0px !important'
}
}
}
However, as seen in the picture, you can see in the picture, there's a weird block artifact around the borders whenever the select is focused.
我只希望它看起来像这张照片中的样子,但是一旦聚焦,它就会从顶部照片中接收到那些奇怪的边缘。有什么帮助吗?
解决方案
我最近也一直在玩覆盖。材质组件通常与其他材质组件一起构建,因此您可能必须提供对除MUIOutlinedInput
.
您可能需要自定义MuiInput
和/或MuiInputBase
.
或者,如果您不想覆盖所有这些,您可以创建一个自定义样式对象并将其注入到该组件中使用withStyles
或useStyles
推荐阅读
- r - 添加新列和组属性
- google-compute-engine - ubuntu 18.04 实例升级停止工作
- java - 从 JPanel 自动更新 Jtable 到 Jframe eclipse
- javascript - Vue 中的链式 Promise 未按预期工作
- android - Android使用数据库检查是否存在2条记录
- vb.net - 转换类型错误:无法将类型字符串转换为整数
- c++ - 访问在构造函数期间创建的值 - C++
- java - IllegalStateException:在广播之外调用 finishBroadcast()
- sql - 在查询 oracle 中显示数据但不包括重复数据
- python - 如何计算熊猫中Multiindex的真假?