gpt4 book ai didi

html - 尺寸不适用于 HTML5 输入标签

转载 作者:搜寻专家 更新时间:2023-10-31 02:25:02 24 4
gpt4 key购买 nike

对于下面的代码,尺寸值被忽略。感谢任何帮助?

<p><input type="submit" name="login" id="login" value="Login" size="125"/> </p>

最佳答案

它用于 text, password or file input field

The size attribute is used to set the width of a text, password or file input field. The length of these fields is determined by the number of characters that should be visible

For all other input types, the size refers to the width of the control in pixels. Given the presentational nature of this attribute, it’s usually best avoided. Instead, use CSS to define field widths using more precise measurements, with the exception of a file input where CSS control over the input’s appearance is severely limited (for very valid security reasons) and the size attribute is your only real option.

关于html - 尺寸不适用于 HTML5 输入标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10081659/

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