如何用tailwindcss禁用环形阴影?
这就是我的问题的样子(请参阅戒指):
使用Chrome的检查员发现它与- TW-RING SHADOW
有关。 因此,我尝试添加ring-0
和ring-offset-0
之类的类(如下所示),但它不起作用!
import { TextField } from "@mui/material";
function ContactForm(): JSX.Element {
return (
<div className="form-container pt-12 flex flex-col items-center">
<div className="input-row">
<TextField
className="ring-offset-0 ring-0"
label="First Name"
variant="outlined"
/>
</div>
</div>
);
}
export default ContactForm;
您是否知道如何摆脱这个烦人的边界,这与输入字段重叠?
感谢您的帮助!
This is how my problem looks like (see the ring) :
Using the Chrome's inspector found that it is related to --tw-ring-shadow
.
So I tried adding classes like ring-0
and ring-offset-0
(as you can see below) but it didn't work!!
import { TextField } from "@mui/material";
function ContactForm(): JSX.Element {
return (
<div className="form-container pt-12 flex flex-col items-center">
<div className="input-row">
<TextField
className="ring-offset-0 ring-0"
label="First Name"
variant="outlined"
/>
</div>
</div>
);
}
export default ContactForm;
Do you have any idea for how can I get rid of this annoying border that overlaps the input field??
I'd appreciate your help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以尝试通过在您的应用程序的CSS中添加以下内容来覆盖输入字段的尾风CSS变量:
另外...我们看不到
&lt; textfield&gt;
生成的代码,以确保您的尾随效用类正正确地应用于输入元素,但是如果没有,您可以尝试使用&gt;
字段来定位&lt;
字段,使用@Apply
在您的CSS文件中:You could try overriding the Tailwind CSS variable for input fields by adding the following in your application's CSS:
Alternatively...we can't see the code generated by
<Textfield>
to ensure that your Tailwind utility classes are being applied correctly to the input element, but if they are not, you could try targeting the<input>
field directly using@apply
in your CSS file:尝试添加焦点:在这样的课程之前:
此更改确保在单击输入字段时应用样式的“ RING-FORFSET-0”和“ RING-0”。
Try adding focus: before your classes like this:
This change makes sure that the styles 'ring-offset-0' and 'ring-0' are applied when you click on the input field.