中心文件输入-HTML/CSS [英] Center File Input - Html/Css

查看:31
本文介绍了中心文件输入-HTML/CSS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

伙计们,我正在使用HTML,Javascript和CSS建立一个网站,并且我有文件输入,但是由于某种原因,它不会完全居中.

So guys, I am building a website using HTML, Javascript and CSS, and I have a file input but for some reason it won't get completely centered.

body {
  width: 100%;
  height: 100%;
  margin: auto;
  text-align: center;
}
#inp {
  text-align: center;
  margin: auto;
}

<input id="inp" type="file" accept="image/*">

推荐答案

工作正常,我们可以获取完整的代码吗?

It works fine, can we get the entire code ?

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>

这篇关于中心文件输入-HTML/CSS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆