HTML5日期输入宽度 [英] HTML5 date input width
本文介绍了HTML5日期输入宽度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
所以我在尝试在日期输入上强制设置大小时遇到问题.有没有其他人遇到这个问题或知道如何解决这个问题?
So i am having an issue trying to force a size on a date input. Has anyone else had this issue or know how to get around it?
<input style="width:50px;" type="date" value="">
这很简单,宽度仅更改文本区域,实际控件不更改,固定在125 px左右左右.
It is pretty simple, the width only changes the textarea, the actual control does not change, it is fixed at about 125 px width or so.
我也在CSS中尝试过width ="和max-width,都行不通.
I have also tried width="" and max-width in the css, neither work.
推荐答案
使用chrome 45,我只需设置字体大小.它按比例更改了文本和控件句柄.不确定那是您想要的效果(?).
With chrome 45, I just set the font-size. It proportionately changed the text and the control handles. Not sure that was the effect you were looking for(?).
<input style="font-size: 3rem" type="date" id="Date">
这篇关于HTML5日期输入宽度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文