5
我正在尝试使输入具有一定的宽度。我正在使用Angular Material 2,但由于某些原因,CSS中的样式未应用于输入标签。 Here is a working plunker of my issue与受影响的代码一起:使用角材料2输入的自定义样式
@Component({
selector: 'my-app',
template: `
<div>
<form>
<md-input [(ngModel)]="cycleTime" type="number" name="email">
<span md-prefix>Cycle Time:</span>
<span md-suffix> minutes</span>
</md-input>
</form>
</div>
`,
styles:[`
input {
width: 50px;
text-align: right;
}
`],
directives: [MdButton, MdInput]
})
export class AppComponent {
cycleTime = 1
constructor() {}
}
我如何风格,是由角材料2中创建的输入?
该解决方案影响的所有输入。有没有办法只做一个输入或一组输入? – Hayzum