代码之家  ›  专栏  ›  技术社区  ›  Apple Orange

设置模态角度4的宽度和高度

  •  1
  • Apple Orange  · 技术社区  · 8 年前

    在我的模态宽度和高度是应用所有模态,但我只想应用我已经打开模态。 如果你看我的代码容易理解。

    这是我的代码:

    <app [(visible)]="test" [height]="height" [width]="width"> 
    </app>
    <app2 [(visible)]="test2" [height]="height" [width]="width"> 
    </app2>
    

    打开弹出窗口并签入inspect元素,查看两个弹出窗口的高度、宽度和标题。 如何解决这个问题?

    1 回复  |  直到 8 年前
        1
  •  2
  •   Sujeith Gopi Nath    8 年前

    在一个简单的解决方法中,您可以在CSS的帮助下设置应用程序的模式大小。使用具有唯一CSS的父holder元素修改

    <div class="app1-style"> <app [(visible)]="test"></app> </div>
    <div class="app2-style"> <app [(visible)]="test"></app> </div>
    
    推荐文章