gpt4 book ai didi

html - 如何使文本在输入的文件类型中右对齐?

转载 作者:行者123 更新时间:2023-11-28 02:06:10 25 4
gpt4 key购买 nike

在 HTML 输入文件类型属性中,如何使我通过浏览获得的文件路径右对齐?

<input type=file id='id' class='file' />
$('#id').css('text-align','right')

不工作。

我试过了

$('#id').attr('style','text-align:right');

但是没有用。如果我使用 class 而不是 id 那么它也不起作用

最佳答案

您不能修改输入文件的样式,但可以使用其他方法间接设置样式..

试试这个。

http://www.quirksmode.org/dom/inputfile.html

http://www.kavoir.com/2009/02/styling-file-upload-select-input-control-input-typefile.html

关于html - 如何使文本在输入的文件类型中右对齐?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11430288/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com