javascript - 如何从下拉边框底部删除边框颜色?

标签 javascript html css reactjs material-ui

我正在尝试从下拉列表中删除边框颜色 border-bottom: 1px solid rgba(0, 0, 0, 0.42);

调试的时候发现它来自这个类MuiInput-underline-2593

但是 CSS 类 MuiInput-underline-2593:before 来自框架。

你们能告诉我如何修复它吗?以便将来我可以自己修复它。 在下方提供我的相关代码片段和沙箱链接

https://codesandbox.io/s/4x9lw9qrmx

MuiInput-underline-2593:before {
    left: 0;
    right: 0;
    bottom: 0;
    content: "\00a0";
    position: absolute;
    transition: border-bottom-color 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
    border-bottom: 1px solid rgba(0, 0, 0, 0.42);
    pointer-events: none;
}


<Select
    className={classes.queryBuilderContainerItem}
    classes={classes}
    styles={selectStyles}
    options={this.state.suggestions}
    components={components}
    value={this.state.single}
    onChange={this.handleChange("network")}
    placeholder="Search a to do"
/>

最佳答案

您可以将自己的样式/类添加到您需要的元素中,并使用 !important 后缀设置 border-bottom 规则。这将覆盖您框架中的规则。

.your-class{
   border-bottom: 0px !important;
}

关于javascript - 如何从下拉边框底部删除边框颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53823807/

相关文章:

javascript - 通过javascript改变-webkit-mask-position

javascript - jQuery - 网格返回不均匀的行和列

jquery - 加载页面时 .addclass 不工作

json - HTML5 localstorage 添加双引号

css - Div 不会在 Firefox 上显示在同一行中

javascript - jQuery 生成短的唯一编号

javascript - 自定义查询字符串解析器返回不正确的结果

html - 悬停时的 Z-index

javascript - PHP 单击链接而不是行切换

html - 为什么类 ="btn btn-default"而不是只有类 ="btn-default"