0
好吧,我有一个使用嵌入视图的角度应用程序。不确定它是否重要,但是如果它是一个普通的html文件,我将它的实际内容替换为所有的嵌入。无论如何,我试图在页面底部水平居中固定的uib-pagination元素。CSS:以引导分页元素为中心
<!DOCTYPE html>
<html>
<head>
<title></title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<!-- Imports for my personal stylesheet as well as ui-bootstrap's and angular material's stylesheets go here-->
</head>
<body style="width:100vw; height:auto">
<div ng-app="app" layout-fill ng-cloak>
<div class="root-container" layout-fill style="width:100vw; height:auto padding:0; position: absolute;">
<md-content layout="column" layout-fill style="width:100vw; height:auto">
<md-toolbar style="width:100vw; height:auto">
<div class="md-toolbar-tools">
<md-button aria-label="Go Back"> Go Back </md-button>
<md-button class="md-raised" aria-label="Learn More"> Learn More </md-button>
</div>
</md-toolbar>
<md-tabs md-selected="vm.selectedIndex" md-border-bottom>
<md-tab label="Home"> </md-tab>
<md-tab label="Submit"> </md-tab>
<md-tab label="Contact"> </md-tab>
</md-tabs>
<md-content class="main-body-content">
<ul uib-pagination total-items="vm.itemCount" items-per-page="vm.itemsPerPage" ng-model="vm.currentPage" ng-change="log()" max-size="vm.maxShownPagination" class="pagination-lg" boundary-links="true" force-ellipses="true">
</ul>
</md-content>
</div>
</md-content>
</div>
</div>
<!---- scripts go here ---->
</body>
</html>
这里是我的样式与主体内容的背景红色的对比度和视图能力:
.main-body-content {
height: 100vh;
width: 100vw;
background: red;
}
.pagination-lg {
position: fixed;
bottom: 0px;
width: 100vw;
margin-left: auto;
margin-right: auto;
}
下面是截图:
,你可以请参阅页面底部附近的分页元素,并且它与视口一起滚动,但不是水平居中。帮帮我?新的CSS。
感谢,我会检查出来,并送还给你。如果我满意,我会给你upvote – RudolphRedNose
当然。让我知道事情的后续。 –
非常感谢,我没有意识到Angular Material和UI-Bootstrap之间会有兼容性问题。 – RudolphRedNose