2016-11-25 21 views
0

我不得不在自举网页中自定义按钮。它适用于IE,但不适用于Chrome。我哪里做错了。以下是我的html。定制bootstrap btn不能在铬上工作

 .btn-secondary { 
 
     background-color: #283238; 
 
     color: #05a9d0; 
 
     border-color: #05a9d0; 
 
     border-radius: 0; 
 
     font-family:Helvetica Neue; 
 
     font-size:20px; 
 
     width:auto; 
 
     opacity:0.9; 
 
     border:1px solid; 
 
     height:auto; 
 
    
 
    } 
 
    .btn-secondary:hover, 
 
    .btn-secondary:focus, 
 
    .btn-secondary:active { 
 
     background-color: #283238; 
 
     color: #ffffff; 
 
     border-color: #05a9d0; 
 
    }
<div id="banner" class=" text-center vertical-center"> 
 
    <div class="slide-top" id="valign-IE" data-plugin-options='{"speed":1500}'> 
 
    <img src="img/logo_page.svg" class="banner-logo"/><br /> 
 

 
    <button class="btn btn-primaryLogin" onclick="document.location.href='signin.aspx'">Login</button> 
 
    <button type="button" class ="btn btn-secondary" >REQUEST ACCESS FOR SIGNUP</button> 
 
    </div> 
 
    </div>

+1

你能解释一下你想达到什么吗? https://jsfiddle.net/bd3ce0dg/ –

回答

0

window.location的是阅读上的所有兼容的浏览器/写入。

document.location在Internet Explorer中是只读的,但在基于Gecko的浏览器(Firefox,SeaMonkey)中可读写。

使用window.location代替document.location

+0

你看过这个问题吗? – Danh