上传到服务器时,标头更改样式

时间:2019-04-27 10:58:24

标签: javascript jquery html css

我有一个在线的网站。其标题应类似于下图:

enter image description here

当我仅在本地工作时,但是当我将其上传到服务器时,除一页外,每页的标题都会变小

enter image description here

每个页面page都会变小,except

以下是标头的CSS:

body {
  font-family: Montserrat, sans-serif;
}

.navbar-inverse .navbar-toggle {
  border-color: #fff;
  border-radius: 0;
}

.navbar-inverse .navbar-collapse,
.navbar-inverse .navbar-form {
  border-color: transparent;
  padding: 10px 22px 0 5px;
}

.navbar-inverse :hover {
  background-color: transparent;
}

.navbar-header {
  float: none;
}

.custom-navbar {
  padding: 0;
}

.navbar {
  border-radius: 0;
  background-color: #01b7a8;
  border-color: #01b7a8;
  box-shadow: 0 0px 10px 3px rgba(0, 0, 0, .5);
}

.navbar-inverse .navbar-nav>li>a {
  font-size: 19px;
  color: #fff;
  letter-spacing: 1px;
}

.navbar-inverse .navbar-nav>li>a:hover {
  background-color: #01b7a8;
  color: #0a2240;
}

.navbar-inverse .navbar-toggle:focus,
.navbar-inverse .navbar-toggle:hover {
  background-color: transparent;
}

@media screen and (max-width: 768px) {
  .custom-navbar {
    display: inline-flex;
  }
  .custom-navbar li .btn {
    margin-bottom: 2vh;
  }
}

@media screen and (min-width: 768px) {
  .navbar-right {
    /*position: relative;
                top: -7vh*/
  }
  .custom-navbar {
    position: absolute;
    top: 1vh;
    z-index: 2222;
    right: 3vh;
  }
}

@media (max-width: 767px) .navbar-inverse .navbar-nav .open .dropdown-menu>li>a {
  color: #0a2240;
}

@media (max-width: 767px) .navbar-inverse .navbar-nav .open .dropdown-menu>li>a {
  color: #0a2240;
  background-color: #fff;
  /* padding: 0 15px 0 15px; */
}

.dropdown-menu>li>a {
  color: #0a2240 !important;
  background-color: #efeff0;
}


/* dropdown-menu */

@media (max-width: 767px) .navbar-nav .open .dropdown-menu>li>a {
  line-height: 20px;
}

.container-fluid {
  padding-right: 15px;
  padding-bottom: 15px;
  padding-top: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}

.navbar-inverse .navbar-nav>.open>a,
.navbar-inverse .navbar-nav>.open>a:focus,
.navbar-inverse .navbar-nav>.open>a:hover {
  color: #fff;
  background-color: transparent;
}

.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,
.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover {
  color: #fff;
  background-color: #d9f4f2;
}

.dropdown-submenu {
  position: relative;
}

.dropdown-submenu>.dropdown-menu {
  top: 0;
  left: 100%;
  margin-top: -6px;
  margin-left: -1px;
  -webkit-border-radius: 0 6px 6px 6px;
  -moz-border-radius: 0 6px 6px;
  border-radius: 0 6px 6px 6px;
}

.dropdown-submenu:hover>.dropdown-menu {
  display: block;
}

.dropdown-menu {
  position: absolute;
  top: 132%;
  border-radius: 0;
  padding: 0 0;
  border: 0px;
}

.dropdown-submenu>a:after {
  display: block;
  content: " ";
  float: right;
  width: 0;
  height: 0;
  border-color: transparent;
  border-style: solid;
  border-width: 5px 0 5px 5px;
  border-left-color: #333! important;
  margin-top: 5px;
  margin-right: -10px;
}

.dropdown-menu>li>a {
  display: block;
  padding: 10px 20px;
  color: #0a2240 !important;
  background-color: #efeff0;
}

.dropdown-menu>li>a:hover {
  background-color: #d9f4f2;
}

.dropdown-submenu>a:after {
  display: block;
  content: " ";
  float: right;
  width: 0;
  height: 0;
  border-color: transparent;
  border-style: solid;
  border-width: 5px 0 5px 5px;
  border-left-color: #ccc;
  margin-top: 5px;
  margin-right: -10px;
}

.dropdown-submenu:hover>a:after {
  border-left-color: #fff;
}

.dropdown-submenu.pull-left {
  float: none;
}

.dropdown-submenu.pull-left>.dropdown-menu {
  left: -100%;
  margin-left: 10px;
  -webkit-border-radius: 6px 0 6px 6px;
  -moz-border-radius: 6px 0 6px 6px;
  border-radius: 6px 0 6px 6px;
}


/*dropdown-menu end */


/*top button */

.btn:hover {
  background-color: #2B3856 !important;
  color: #f8dd4d !important;
  border-color: #2B3856 !important;
}

.btn:active {
  background-color: #2B3856 !important;
  color: #f8dd4d !important;
  border-color: #2B3856 !important;
}


/*links styling*/

#myNavbara>li>a: hover {
  background-color: #01b7a8 !important;
  color: #0a2240 !important;
}

谁能告诉我该如何解决?

2 个答案:

答案 0 :(得分:1)

我认为,必须有一个实时CDN链接,而该链接在本地不起作用,这可能是因为Internet问题,并且当您在服务器上上传时它可以与Internet一起工作。

您可以为此检查所有文件。可能这将为您工作。 谢谢。

答案 1 :(得分:0)

我注意到您已将行内样式应用于标题按钮,这些样式在this页面和this页面上有所不同。另外,我注意到您的某些字体大小为vh。尝试改用emrem之类的东西。

我不知道您是如何构建此网站的,但是,如果可能的话,请删除内联样式并改为使用其类的按钮样式。