Ive got some input fields which i want to style to initially look like labels, and then via angular.js apply a style to them so they can be edited after button is pressed. I'm using bootstrap, is there a inbuilt class i can toggle on and off these inputs?
我有一些输入字段,我想要样式,最初看起来像标签,然后通过angular.js应用样式,以便按下按钮后可以编辑它们。我正在使用bootstrap,是否有内置类我可以切换这些输入?
2 个解决方案
#1
14
<style type="text/css">
.asd {
background:rgba(0,0,0,0);
border:none;
}
</style>
<input type="text" class="asd" value="Label look like" disabled/>
#2
0
Not as easy as toggling a class, but you could use a <p>
with the .form-control-static
class for a label, and a normal input field. Then switch visibility on those for editing.
不像切换类那么容易,但是你可以使用带有.form-control-static类的
作为标签和普通的输入字段。然后切换可见性以进行编辑。
#1
14
<style type="text/css">
.asd {
background:rgba(0,0,0,0);
border:none;
}
</style>
<input type="text" class="asd" value="Label look like" disabled/>
#2
0
Not as easy as toggling a class, but you could use a <p>
with the .form-control-static
class for a label, and a normal input field. Then switch visibility on those for editing.
不像切换类那么容易,但是你可以使用带有.form-control-static类的
作为标签和普通的输入字段。然后切换可见性以进行编辑。