如何更改材料 - UI中的Textfield悬停边界效应?

发布于 2025-01-31 17:34:26 字数 840 浏览 0 评论 0原文

因此,在波斯语中,方向是rtl

我想知道如何将此输入更改为项目的语言?

请查看此图像

“”

这是我想做的,但我不知道如何改变悬停的边界线。 我可以使用位置更改标签文本:相对或绝对并将其移动,但是当我们单击输入输入以键入键入时,IDK如何处理该边界?

我该如何移动?感谢您的帮助。

材料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>

so in persian language the direction is 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?

how can i move that ? I Will appreciate some help.

enter image description here

material ui code

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

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

池木 2025-02-07 17:34:26

您需要将内部fieldset的文本单位更改为“右”,而不是“左”,也可以更改标签的变换x属性,也可以从左:0到右更改:0,以将标签的放置从从左到右,有多个解决方案,只需检查文档即可学习如何更改内部元素的属性。

You need to change the inner fieldset text-align to "right" instead of "left", and also change the transform X property of label, also you can change from left:0 to right:0, to move the placement of label from left to right, there are multiple solutions, just check documentation to learn how to change properties of inner elements.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文