bootstrap css选择不同的宽度

时间:2023-03-08 21:52:32
bootstrap css选择不同的宽度

刚开始使用bootstrap css开源项目。遇到一个问题,默认的input 宽度太大,需要找小一点的。

其实只需要在input tag中选用预定义的较小的宽度即可。比如:

<input type="number" class="input-small"></input>

input-small是预定义的一种类别,在bootstrap.css文件中有一组这样的类别:

.input-mini {
width: 60px;
} .input-small {
width: 90px;
} .input-medium {
width: 150px;
} .input-large {
width: 210px;
} .input-xlarge {
width: 270px;
} .input-xxlarge {
width: 530px;
}