0

我想使用两种 CSS 样式 bootstrap 和 topcoat。我使用角度滑动菜单功能(ng-mobile-menu)。当我添加引导 CDN 时。它会覆盖面漆菜单,结果幻灯片菜单的背景颜色变得更短,只覆盖菜单列表:http ://www.elmandato.pl但它应该是http://www.shoppinpal.github.io/ng-移动菜单/演示/#/skinny。我应该添加(更改链接 rel 的顺序无关紧要):

<link rel="stylesheet" href="topcoat/css/topcoat-mobile-dark.min.css"/>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0./css/bootstrap.min.css"/>
<link rel="stylesheet" href="ng-mobile-menu.min.css"/>
<style>
html, body {
  margin:0;
  padding:0;
  height: 100%;
}

#menubutton {
  padding: 0 1.25rem;
  font-size: 16px;
  /* vertically center button text */
  line-height: 3rem;
  -webkit-border-radius: 3px;
  border-radius: 3px;
  color: #454545;
  text-shadow: 0 1px #fff;
  background-color: white;
  -webkit-box-shadow: inset 0 1px #fff;
  box-shadow: inset 0 1px #fff;
  border: 1px solid #a5a8a8;
}
</style>
4

1 回答 1

1

Bootstrap 覆盖面漆,因为您已将指向它的链接放在面漆下方。CSS 从上到下级联,这意味着 bootstrap 覆盖、topcoat 和 ng-mobile-menu.min.css 覆盖 bootstrap 和 topcoat。尝试将 bootstrap 放在 topcoat 之上,然后使用开发人员工具查看类/ID 的选择器是什么,并在需要时覆盖

于 2013-09-17T15:31:55.763 回答