qui*_*que 3 css input semantic-ui
你好我是语义世界的新手,我想自定义默认的输入高度和宽度我知道我们有语义的预定义类,如small,big,mini但我需要有自定义的高度和宽度.
在输入部分的语义文档(http://semantic-ui.com/elements/input.html)中,我们有以下消息:
"输入将自动调整大小,除非您手动声明宽度"
我在输入中声明了宽度,如下所示:
<input width="10" type="text" value="test" placeholder="empty" readonly>
Run Code Online (Sandbox Code Playgroud)
但它对我不起作用.请帮助一下.
注意:width属性仅用于
<input type="image">. http://www.w3schools.com/tags/att_input_width.asp
这就是你的代码不起作用的原因.为了使它工作,你可以这样做:
<input style="width:100px; height: 100px;" type="text" value="test" placeholder="empty" readonly>
Run Code Online (Sandbox Code Playgroud)
或者使用CSS文件:
input[type="text"] {
width: 100px;
height: 100px;
}
Run Code Online (Sandbox Code Playgroud)
您可以将100px更改为所需的宽度和高度.语义UI不会为您设置宽度和高度,这就是他们说手动声明宽度的原因.