Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在创建表单的过程中,我希望文本标签的宽度都相同。由于某种我无法辨别的原因,使用width不能像以下那样工作:
width
.form-label { display:inline; width: 160px; } <div class="form-label required">First Name:</div>
提琴手
如何让.form-label班级响应宽度声明?谢谢!
.form-label
将其从 display:inline 更改为 display:inline-block。
对象位置inline没有宽度属性,我认为您正在寻找inline-block;
inline
inline-block;