2017-04-11 73 views
0

我做了一个jquery的3个div的淡入淡出和一些h3来自左侧,并留在屏幕中间,但当我调整窗口的大小让我们说到手机尺寸信件不停留在中间,但继续前进,我看起来很坏。jquery动画和移动电话

此外,因为我使用引导,我的导航栏变得很小,并且让你点击现在有一个下拉按钮,如果我点击那里的h3段insted停留在它在div上的地方它上升它不遵循div,但它停留在屏幕的特定部分)。

这是我目前有:

$(document).ready(function() { 
 
    $("#div1").fadeIn(5000, function() { 
 
    $(".what").animate({ 
 
     "left": "45%" 
 
    }, 1300); 
 
    }); 
 
    $("#div2").fadeIn(3000); 
 
    $("#div3").fadeIn(1500); 
 
});
#what { 
 
    position: absolute; 
 
    left: -40%; 
 
    top: 130px; 
 
} 
 

 
#div1 { 
 
    display: none; 
 
} 
 

 
#div2 { 
 
    display: none; 
 
} 
 

 
#div3 { 
 
    display: none; 
 
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> 
 
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> 
 
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" /> 
 

 

 

 
<div id="div1" class="container-fluid bg-1 text-center"> 
 
    <h3><a id="what" class="margin what">What Am I?</h3></a> 
 
    <img src="https://thumb.ibb.co/fEchLa/e.jpg" class="img-responsive img- 
 
    circle margin kuklos" style="display:inline" alt="Me" width="350" height="650"> 
 
    <h3>I'm A Young Freelancer.</h3> 
 
</div>

+0

我认为您需要明确说明您希望我们为您提供什么帮助。 – Zze

+0

你解决了这个问题吗? –

回答

0

先给#DIV1 {位置:相对;宽度:100%}