2016-10-05 58 views
-2

以下是在我的應用程序中使用的按鈕類。有人可以爲禁用的按鈕製作課程嗎?需要禁用按鈕的CSS

.myButton { 
    -moz-box-shadow:inset 0px 1px 0px 0px #ffffff; 
    -webkit-box-shadow:inset 0px 1px 0px 0px #ffffff; 
    box-shadow:inset 0px 1px 0px 0px #ffffff; 
    background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #f9f9f9), color-stop(1, #e9e9e9)); 
    background:-moz-linear-gradient(top, #f9f9f9 5%, #e9e9e9 100%); 
    background:-webkit-linear-gradient(top, #f9f9f9 5%, #e9e9e9 100%); 
    background:-o-linear-gradient(top, #f9f9f9 5%, #e9e9e9 100%); 
    background:-ms-linear-gradient(top, #f9f9f9 5%, #e9e9e9 100%); 
    background:linear-gradient(to bottom, #f9f9f9 5%, #e9e9e9 100%); 
    filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9f9f9', endColorstr='#e9e9e9',GradientType=0); 
    background-color:#f9f9f9; 
    -moz-border-radius:6px; 
    -webkit-border-radius:6px; 
    border-radius:6px; 
    border:1px solid #dcdcdc; 
    display:inline-block; 
    cursor:pointer; 
    color:#666666; 
    font-family:Arial; 
    font-size:10px; 
    font-weight:bold; 
    padding:6px 24px; 
    text-decoration:none; 
    text-shadow:0px 1px 0px #ffffff; 
} 
.myButton:hover { 
    background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #e9e9e9), color-stop(1, #f9f9f9)); 
    background:-moz-linear-gradient(top, #e9e9e9 5%, #f9f9f9 100%); 
    background:-webkit-linear-gradient(top, #e9e9e9 5%, #f9f9f9 100%); 
    background:-o-linear-gradient(top, #e9e9e9 5%, #f9f9f9 100%); 
    background:-ms-linear-gradient(top, #e9e9e9 5%, #f9f9f9 100%); 
    background:linear-gradient(to bottom, #e9e9e9 5%, #f9f9f9 100%); 
    filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#e9e9e9', endColorstr='#f9f9f9',GradientType=0); 
    background-color:#e9e9e9; 
} 
.myButton:active { 
    position:relative; 
    top:1px; 
} 

謝謝,我真的很感激它。

回答

-1
<button type="button" class="btn btn-primary disabled">Disabled Primary</button> 

以上是在自舉 或CSS指針事件禁用按鈕的代碼:無;在按鈕使得按鈕被禁用

+0

即時尋找簡單的css類,將使我的按鈕看起來禁用。 – user6708151

0
**Simple code to disabled button** 
    <button type="button" disabled>Click Me!</button> 
+0

這不適用,因爲該類應用於按鈕。我需要另一個班級給殘疾人看按鈕 – user6708151