Angular JS 部分不会停留在原处

问题描述 投票:0回答:2

嗨,我的index.html中有3个部分

<!--header view-->
 <div id="header" ng-include="'partials/header.html'"></div>

<!--main page view-->
   <div ui-view class=""></div>



<!-- Loading the Footer -->
  <div id="oilFooter" ng-include="'partials/footer.html'"></div>
</html>
</body>

标题当前与下面的主视图重叠。

看起来像这样:

enter image description here

我希望它看起来像这样:

enter image description here

这是 header.html 的 css

header {
position: absolute;
top:0px;
 margin: 0 auto;
margin-bottom:10px;
width:100%;
height:85px;
z-index:300;
background-color:#000000;
 font-family: 'Open Sans', sans-serif; color:#c4c4c4; font-size:16.0px; line-height:1.19em;

html 的 CSS

/* general settings */
html {
 min-height:100%;
  overflow-x:hidden;
  overflow-y:scroll;
  position:relative;
  width:100%;
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom:0px;
   /* background-color:#1c1c1c;*/
    background-color:#cecece;


}

谢谢。

html css angularjs
2个回答
0
投票

我将标题定位从绝对位置更改为相对位置。


0
投票

这并不是一个真正的答案,但这似乎是一个 CSS 问题。添加这个

{
  background: #000 !important;
  color: #0f0 !important;
  outline: solid #f00 1px !important;
}

并检查是否有任何元素偏离边界。

© www.soinside.com 2019 - 2024. All rights reserved.