如何设置圆角和宽度 el-input class=w-50 m-2 size=small placeholder=Please Input
要设置圆角和宽度,你可以在 el-input 元素上添加相应的样式类名或内联样式。
使用样式类名:
<el-input class="w-50 m-2 rounded" size="small" placeholder="Please Input" />
然后在你的样式表中定义这些样式类:
.w-50 {
width: 50px;
}
.m-2 {
margin: 2px;
}
.rounded {
border-radius: 5px;
}
使用内联样式:
<el-input :style="{ width: '50px', margin: '2px', borderRadius: '5px' }" size="small" placeholder="Please Input" />
这样就可以设置 el-input 元素的宽度为 50px,边距为 2px,以及圆角为 5px。
原文地址: https://www.cveoy.top/t/topic/iZYu 著作权归作者所有。请勿转载和采集!