伙计们,我正在使用 HTML、Javascript 和 CSS 构建一个网站,我有一个文件输入,但由于某种原因它不会完全居中。
body {
width: 100%;
height: 100%;
margin: auto;
text-align: center;
}
#inp {
text-align: center;
margin: auto;
}
<input id="inp" type="file" accept="image/*">
最佳答案
它工作正常,我们能得到完整的代码吗?
body {
width: 100%;
height: 100%;
margin: auto;
text-align: center;
}
#inp {
text-align: center;
margin: auto;
}
<body>
<input id="inp" type="file" accept="image/*">
</body>
关于javascript - 中心文件输入 - Html/Css,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40283338/