Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/431.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 从ngView加载模板时CSS发生变化(Vegas幻灯片)_Javascript_Jquery_Html_Css_Angularjs - Fatal编程技术网

Javascript 从ngView加载模板时CSS发生变化(Vegas幻灯片)

Javascript 从ngView加载模板时CSS发生变化(Vegas幻灯片),javascript,jquery,html,css,angularjs,Javascript,Jquery,Html,Css,Angularjs,我正在实现一个简单的网页,我想有一个全屏滑块和下面的一些内容主页。另一方面,我想有额外的看法,我想禁用全屏,只是有一些其他内容 我使用的角度项目生成通过约曼和一些免费可用的引导模板 当我把我所有的主页代码都放到index.html中时,一切都很好。在index.html中,我有所有的bower组件、css、自定义脚本——vegas幻灯片在全屏上显示,上面有内容 然而-当我将主页内容vegas slideshow+内容移动到角度视图时,我们称之为mani,只在index.hmtl中留下导航栏菜单、

我正在实现一个简单的网页,我想有一个全屏滑块和下面的一些内容主页。另一方面,我想有额外的看法,我想禁用全屏,只是有一些其他内容

我使用的角度项目生成通过约曼和一些免费可用的引导模板

当我把我所有的主页代码都放到index.html中时,一切都很好。在index.html中,我有所有的bower组件、css、自定义脚本——vegas幻灯片在全屏上显示,上面有内容

然而-当我将主页内容vegas slideshow+内容移动到角度视图时,我们称之为mani,只在index.hmtl中留下导航栏菜单、页脚等,CSS似乎被破坏了,因为vegas slideshow现在不覆盖全屏,而只是其中的一部分。-您可以看到显示内容黑色背景div,而应显示全屏+图像移到顶部/被截断

我假设这和渲染角度温度的顺序有关,很可能是异步加载的,我尝试过移动东西,在文档准备好后运行vegas,但没有成功

一段代码:

index.html

欢迎任何帮助


更新-JSFiddle链接:

在JSFiddle或codepen中发布代码以获得更好的视图。您是否能够解决此问题。
 <body ng-app="semApp" id="page-top" data-spy="scroll" data-target=".navbar-fixed-top">
<!--[if lte IE 8]>
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade
    your browser</a> to improve your experience.</p>
<![endif]-->

<!-- Navigation -->
<nav class="navbar navbar-custom navbar-fixed-top" role="navigation">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-main-collapse">
                <i class="fa fa-bars"></i>
            </button>
            <a class="navbar-brand page-scroll" href="#page-top">
                <span class="light">Isabel</span>
            </a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse navbar-right navbar-main-collapse">
            <ul class="nav navbar-nav">
                <!-- Hidden li included to remove active class from about link when scrolled up past about section -->
                <li class="hidden">
                    <a href="#page-top"></a>
                </li>
                <li>
                    <a class="page-scroll" href="#/#about">O nas</a>
                </li>
                <li>
                    <a class="page-scroll" href="/#/#download">Download</a>
                </li>
            </ul>
        </div>
        <!-- /.navbar-collapse -->
    </div>
    <!-- /.container -->
</nav>

<div ng-view=""></div>
</div>

<!-- Footer -->
<footer>
    <div class="container text-center">
        <p>Copyright &copy; Your Website 2014</p>
    </div>
</footer>
<!-- Intro Header -->
<header class="intro">
  <div class="intro-body">
    <div class="container middlePage">
      <div class="row">
        <div class="col-md-8 col-md-offset-2">
          <h1 class="brand-heading">Isabel</h1>
          <p class="intro-text">
            <a href="" class="btn btn-default">Kolekcja 2016</a></p>
          <a href="#about" class="btn btn-circle page-scroll">
            <i class="fa fa-angle-double-down animated"></i>
          </a>
        </div>
      </div>
    </div>
  </div>
</header>

<!-- Download Section -->
<section id="download" class="content-section text-center">
  <div class="download-section">
    <div class="container">
      <div class="col-lg-8 col-lg-offset-2">
        <h2>Download Grayscale</h2>
        <p>You can download Grayscale for free on the preview page at Start Bootstrap.</p>
        <a href="http://startbootstrap.com/template-overviews/grayscale/" class="btn btn-default btn-lg">Visit Download Page</a>
      </div>
    </div>
  </div>
</section>

<script>
$( document ).ready(function() {
        $(".intro-body").vegas({
    slides: [
        { src: "images/1.jpg" },
        { src: "images/2.jpg" }
    ]
});
});
</script>
/*!
 * Start Bootstrap - Grayscale Bootstrap Theme (http://startbootstrap.com)
 * Code licensed under the Apache License v2.0.
 * For details, see http://www.apache.org/licenses/LICENSE-2.0.
 */
@import url(http://fonts.googleapis.com/css?family=Lato); /* FREE GOOGLE FONTS */
@import url(https://fonts.googleapis.com/css?family=Cinzel|Great+Vibes);

body {
    width: 100%;
    height: 100%;
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    color: #fff;
    background-color: #000;
}

html {
    width: 100%;
    height: 100%;
}

h1 {
    margin: 0 0 0px;
    font-family: 'Great Vibes', cursive;
    font-weight: 500;
    letter-spacing: 1px;
}

h2,
h3,
h4,
h5,
h6 {
    margin: 0 0 30px;
    font-family: 'Lato', sans-serif;
    font-weight: 500;
    letter-spacing: 1px;
}

p {
    margin: 0 0 25px;
    font-size: 18px;
    line-height: 1.5;
}

@media(min-width:768px) {
    p {
        margin: 0 0 35px;
        font-size: 20px;
        line-height: 1.6;
    }
}

a {
    color: #42dca3;
    -webkit-transition: all .2s ease-in-out;
    -moz-transition: all .2s ease-in-out;
    transition: all .2s ease-in-out;
}

a:hover,
a:focus {
    text-decoration: none;
    color: #1d9b6c;
}

.light {
    font-weight: 400;
}

.navbar-custom {
    margin-bottom: 0;
    border-bottom: 1px solid rgba(255,255,255,.3);
    text-transform: uppercase;
    font-family: Montserrat,"Helvetica Neue",Helvetica,Arial,sans-serif;
    background-color: #000;
}

.navbar-custom .navbar-brand {
    font-weight: 700;
}

.navbar-custom .navbar-brand:focus {
    outline: 0;
}

.navbar-custom .navbar-brand .navbar-toggle {
    padding: 4px 6px;
    font-size: 16px;
    color: #000;
}

.navbar-custom .navbar-brand .navbar-toggle:focus,
.navbar-custom .navbar-brand .navbar-toggle:active {
    outline: 0;
}

.navbar-custom a {
    color: #fff;
}

.navbar-custom .nav li a {
    -webkit-transition: background .3s ease-in-out;
    -moz-transition: background .3s ease-in-out;
    transition: background .3s ease-in-out;
}

.navbar-custom .nav li a:hover {
    outline: 0;
    color: rgba(255,255,255,.8);
    background-color: transparent;
}

.navbar-custom .nav li a:focus,
.navbar-custom .nav li a:active {
    outline: 0;
    background-color: transparent;
}

.navbar-custom .nav li.active {
    outline: 0;
}

.navbar-custom .nav li.active a {
    background-color: rgba(255,255,255,.3);
}

.navbar-custom .nav li.active a:hover {
    color: #fff;
}

@media(min-width:768px) {
    .navbar-custom {
        padding: 20px 0;
        border-bottom: 0;
        letter-spacing: 1px;
        background-color: rgba(0,0,0,0.5);
        -webkit-transition: background .5s ease-in-out,padding .5s ease-in-out;
        -moz-transition: background .5s ease-in-out,padding .5s ease-in-out;
        transition: background .5s ease-in-out,padding .5s ease-in-out;
    }

    .navbar-custom.top-nav-collapse {
        padding: 0;
        border-bottom: 1px solid rgba(255,255,255,.3);
        background: #000;
    }
}

.intro {
    display: table;
    width: 100%;
    height: auto;
    padding: 100px 0;
    text-align: center;
    color: #000;
    background-color: #000;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    background-size: cover;
    -o-background-size: cover;
}

.intro .intro-body {
    display: table-cell;
    vertical-align: middle;
}

.intro .intro-body .brand-heading {
    font-size: 40px;
}

.intro .intro-body .intro-text {
    font-size: 18px;
}

.logo-about {
    height: 100px;
}

.middlePage {
    padding-top: 20%;
}

@media(min-width:768px) {
    .intro {
        height: 100%;
        padding: 0;
    }

    .intro .intro-body .brand-heading {
        font-size: 100px;
    }

    .intro .intro-body .intro-text {
        font-size: 26px;
    }
}

.btn-circle {
    width: 70px;
    height: 70px;
    margin-top: 15px;
    padding: 7px 16px;
    border: 2px solid #000;
    border-radius: 100%!important;
    font-size: 40px;
    color: #000;
    background: 0 0;
    -webkit-transition: background .3s ease-in-out;
    -moz-transition: background .3s ease-in-out;
    transition: background .3s ease-in-out;
}

.btn-circle:hover,
.btn-circle:focus {
    outline: 0;
    color: #000;
    background: rgba(255,255,255,.1);
}

.btn-circle i.animated {
    -webkit-transition-property: -webkit-transform;
    -webkit-transition-duration: 1s;
    -moz-transition-property: -moz-transform;
    -moz-transition-duration: 1s;
}

.btn-circle:hover i.animated {
    -webkit-animation-name: pulse;
    -moz-animation-name: pulse;
    -webkit-animation-duration: 1.5s;
    -moz-animation-duration: 1.5s;
    -webkit-animation-iteration-count: infinite;
    -moz-animation-iteration-count: infinite;
    -webkit-animation-timing-function: linear;
    -moz-animation-timing-function: linear;
}

@-webkit-keyframes pulse {    
    0% {
        -webkit-transform: scale(1);
        transform: scale(1);
    }

    50% {
        -webkit-transform: scale(1.2);
        transform: scale(1.2);
    }

    100% {
        -webkit-transform: scale(1);
        transform: scale(1);
    }
}

@-moz-keyframes pulse {    
    0% {
        -moz-transform: scale(1);
        transform: scale(1);
    }

    50% {
        -moz-transform: scale(1.2);
        transform: scale(1.2);
    }

    100% {
        -moz-transform: scale(1);
        transform: scale(1);
    }
}

.content-section {
    padding-top: 150px;
}

.download-section {
    width: 100%;
    padding: 50px 0;
    color: #fff;
    background: url(../images/downloads-bg.jpg) no-repeat center center scroll;
    background-color: #000;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    background-size: cover;
    -o-background-size: cover;
}

#map {
    width: 100%;
    height: 200px;
    margin-top: 100px;
}

@media(min-width:767px) {
    .content-section {
        padding-top: 100px;
    }

    .download-section {
        padding: 100px 0;
    }

    #map {
        height: 400px;
        margin-top: 250px;
    }
}

.btn {
    border-radius: 0;
    text-transform: uppercase;
    font-family: Montserrat,"Helvetica Neue",Helvetica,Arial,sans-serif;
    font-weight: 400;
    -webkit-transition: all .3s ease-in-out;
    -moz-transition: all .3s ease-in-out;
    transition: all .3s ease-in-out;
}

.btn-default {
    border: 1px solid #000;
    color: #000;
    background-color: transparent;
}

.btn-default:hover,
.btn-default:focus {
    border: 1px solid (0,0,0,.2);
    outline: 0;
    color: #000;
    background-color: rgba(0,0,0,.2);
}

ul.banner-social-buttons {
    margin-top: 0;
}

@media(max-width:1199px) {
    ul.banner-social-buttons {
        margin-top: 15px;
    }
}

@media(max-width:767px) {
    ul.banner-social-buttons li {
        display: block;
        margin-bottom: 20px;
        padding: 0;
    }

    ul.banner-social-buttons li:last-child {
        margin-bottom: 0;
    }
}

footer {
    padding: 50px 0;
}

footer p {
    margin: 0;
}

::-moz-selection {
    text-shadow: none;
    background: #fcfcfc;
    background: rgba(255,255,255,.2);
}

::selection {
    text-shadow: none;
    background: #fcfcfc;
    background: rgba(255,255,255,.2);
}

img::selection {
    background: 0 0;
}

img::-moz-selection {
    background: 0 0;
}

body {
    webkit-tap-highlight-color: rgba(255,255,255,.2);
}