[英]by hover on the text field how to remove the black border
當我們想在文本字段上顯示 hover 時,文本字段中出現一些黑色邊框,如何解決該問題
import React, { useState } from "react";
import TextField from '@mui/material/TextField';
import { styled } from '@mui/material/styles';
const styles = styled(TextField)({
'*.Mui-focused': {
borderColor: 'transparent',
outline:'none',
}})
export default function Demo() {
return (
<>
<TextField id="standard-basic" label="Standard" variant="standard" />
</>
);
}
您可以添加此樣式以在懸停時設置新顏色
'&:hover fieldset': {
borderColor: 'grey',
},
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.