mic*_*yks 16
你可以手动设置如下,
假设你有一个名为的组件 home.component.ts
@Component({
moduleId: module.id,
selector: 'home',
styleUrls: ['home.component.css'],
templateUrl: 'home.component.html',
)}
Run Code Online (Sandbox Code Playgroud)
所以home.component.css,你可以设置它的高度和宽度如下,
:host { // host targets selector: 'home'
display: block;
left: 0;
width: 100%; // takes parent width
OR
widht: 1000px // screen of having 1000px of width
height: 100%; // takes parent height
OR
height: 1000px // screen of having 1000px of height
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
12726 次 |
| 最近记录: |