我想为我的应用程序中的弹出式通知做出响应式设计。我使用Angular Toaster进行通知。使用Css的响应式设计
例如,我在屏幕的中心找到烤面包机容器元素,但是使用绝对位置,所以对于较小的屏幕,通知保持在相同位置,因此不显示它们。我想通知相对于它们所在的父元素(在这里是容器网格)。我如何实现使用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>
而且我用烤面包器容器元素自定义CSS规则:
.toast-container-custo
{
position: absolute;
top:100px;
left: 780px;
}