アプリケーションでポップアップ通知のレスポンシブ デザインを行いたいと考えています。通知には Angular Toaster を使用しています。
たとえば、toaster-container 要素を画面の中央に配置しましたが、絶対位置を使用しているため、小さい画面では通知が同じ位置にとどまり、表示されません。通知が含まれている親要素 (この場合はコンテナー グリッド) に関連する通知を作成したいと思います。CSSを使用してそれを達成するにはどうすればよいですか? これは私のhtmlコードです:
<body data-ng-controller="AppController">
<div id="container" class="container">
<toaster-container toaster-options="{'position-class': 'toast-container-custo','time-out': 3000, 'close-button':true}"></toaster-container>
<div id="header" data-ng-include="'partials/header/header.html'" ></div>
<div data-ng-view></div>
<div id="footer" data-ng-include="'partials/footer/footer.html'"></div>
<!-- This is the div with the overlay css class, so no matter where it is located this div inside the screen, it will cover the whole screen-->
<div id="loader" class="loading overlay" data-ng-if="loader.loading">
<p>We are loading the products. Please wait...</p>
<img alt="" src="images/ajax-loader.gif">
</div>
</div>
<div id="loginPanel" data-ng-include="'partials/content/panels/login.html'"></div>
</body>
toaster-container 要素に使用するカスタム CSS ルールは次のとおりです。
.toast-container-custo
{
position: absolute;
top:100px;
left: 780px;
}