2017-03-15 57 views
-6

找到娄代码(HTML/CSS)是我正尝试移动特定的DIV,但不能 - 注意,我用引导无法元素

HTML - 问题与div ID为“PlayerMain “这是无法移动到页面中心

body { 
 
    background-image: url('../images/dis_bg.png'); 
 
    background-repeat: no-repeat; 
 
    text-align: center; 
 
    align-content: center; 
 
} 
 

 
.whiteBorder { 
 
    display: inline; 
 
    background-color: white; 
 
} 
 

 
.allPage { 
 
    text-align: center; 
 
} 
 

 
.blueFont { 
 
    color: blue; 
 
} 
 

 
#efi { 
 
    max-width: 100%; 
 
    height: auto; 
 
    display: block; 
 
    position: absolute; 
 
    bottom: 20%; 
 
    top: 20%; 
 
    right: 10%; 
 
    z-index: 30; 
 
} 
 

 
.h1Border { 
 
    width: 1500px; 
 
    background-color: white; 
 
    border: none; 
 
} 
 

 
.loginButtonImg { 
 
    margin-top: 10px; 
 
} 
 

 
.loginButtonImg:hover { 
 
    cursor: pointer; 
 
} 
 

 
@media (max-width: 768px) { 
 
    .mobile-only { 
 
    display: none !important; 
 
    } 
 
}
<script src="SCRIPT/JS/site.js"></script> 
 
<link href="SCRIPT/Bootsrap/bootstrap-3.3.7-dist/css/bootstrap.css" rel="stylesheet" /> 
 
<link href="SCRIPT/Bootsrap/bootstrap-3.3.7-dist/css/bootstrap-theme.css" rel="stylesheet" /> 
 
<link href="CSS/site.css" rel="stylesheet" /> 
 
<script src="SCRIPT/Jquery/jquery-3.1.1.js"></script> 
 
<script src="SCRIPT/JS/site.js"></script> 
 
<script src="SCRIPT/Bootsrap/bootstrap-3.3.7-dist/js/bootstrap.js"></script> 
 

 
<div class="container-fluid"> 
 
    <div class="row whiteBorder"> 
 
    <section class="col-xs-12"> 
 
     <div> 
 
     <h1 class="blueFont">דודי,<br /> text, <br /><b>text</b>text</h1> 
 
     </div> 
 
    </section> 
 
    <section class="col-xs-12"> 
 
     <div> 
 
     <img src="images/efi.png" id="efi" class="mobile-only center-block" /> 
 

 
     <div id="treepodiaPlayerMain" class="center-block"></div> 
 
     </div> 
 
     <a href="https://someLink.com"><img src="images/login.png" class="img-responsive center-block loginButtonImg" /></a> 
 
    </section> 
 
    </div> 
 
    <section class="row"> 
 
    <div class="col-xs-12"> 
 
     <img src="images/bottom_icons.png" class="img-responsive center-block" /> 
 
    </div> 
 
    </section> 
 
</div> 
 

 
<script type="text/javascript" src="//someScript.js"></script>

许多在此先感谢!

+0

你的JS在哪里? –

+2

欢迎来到Stack Overflow!请[参观],环顾四周,阅读[帮助],特别是[*我如何提出一个好问题?](/ help /如何问)和* [mcve] * 。此外,请仅为**可运行的**示例使用Stack Snippets('[<>]'工具栏按钮)。如果你不能使其运行,只需使用代码块(''''工具栏按钮)。 –

+0

JS仅仅是一个函数,见bellowfunction INIT(播放器){ player.show({ //所需参数 记载: “代码”, SKU: “225544448896”, 宽度:900,高度 :506, 集装箱: “treepodiaPlayerMain”, //可选参数 的showTime:真实, 弹出:假的, showPoster:真实, showJumboPlay:真实, 自动播放:假 }); } - 请注意,我改变了函数名 –

回答

0

我给你看看snippet只是删除position:absolute;从css你写的id #efi。并再次检查它

+0

不幸的是,efi是一个图像,需要重叠这个div,并删除这个属性,我将失去重叠效果 –

+0

我不告诉你从css中删除efi只是改变它的位置:初始; –