简体   繁体   English

如何更改 Material-ui 中的 TextField 悬停边框效果?

[英]how can i change TextField hover border effect in material-ui?

so in persian language the direction is rtl .所以在波斯语中,方向是rtl

i wanna know how can i change this input to my language for the project ?我想知道如何将此输入更改为我的项目语言?

Please take a look at this Image请看这张图片

this is what i wanna do but i have no idea how can i change the border line on hover.这就是我想做的,但我不知道如何更改悬停时的边界线。 I can change the label text with position: relative or absolute and move it, but when we click the input to type, idk what to do with that borderline?我可以使用position: relative or absolute更改标签文本并移动它,但是当我们单击输入进行输入时,idk 该如何处理该边界线?

how can i move that ?我怎样才能移动它? I Will appreciate some help.我会感谢一些帮助。

在此处输入图像描述

material ui code材质ui代码

import * as React from "react";
import TextField from "@mui/material/TextField";

      <div style={{ margin: "10rem 5rem" }}>
        <TextField
          id="outlined-basic"
          label="متن"
          variant="outlined"
        />
      </div>

您需要将内部字段集文本对齐更改为“右”而不是“左”,并更改标签的变换 X 属性,也可以从左:0 更改为右:0,以移动标签的位置从左到右,有多种解决方案,只需查看文档以了解如何更改内部元素的属性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM