0
我創建了一個具有Login和Cancel按鈕的基本HTML頁面,但是每當我點擊按鈕時,它都允許我編輯按鈕本身的文本。我檢查了編碼,看起來很好。經過研究,我只能得到關於如何編輯字段等文本的結果。我該如何解決這個問題?我的按鈕內的文本可以在HTML中編輯。爲什麼?
這裏是我用來創建按鈕HTML代碼:
<input class="button" onclick="check(this.form)" value="Login"><br /><br />
<input class="button" name="cancel" value="Cancel">
這裏是我使用的CSS按鈕的類:
.button {
display: inline-block;
text-align: center;
vertical-align: middle;
padding: 14px 62px;
border: 0px solid #2b27a1;
border-radius: 35px;
background: #2525f5;
background: -webkit-gradient(linear, left top, left bottom, from(#2525f5), to(#000326));
background: -moz-linear-gradient(top, #2525f5, #000326);
background: linear-gradient(to bottom, #2525f5, #000326);
text-shadow: #591717 1px 1px 1px;
font: normal normal bold 20px verdana;
color: #ffffff;
text-decoration: none;
}
.button:hover,
.button:focus {
border: 0px solid #453eff;
background: #2c2cff;
background: -webkit-gradient(linear, left top, left bottom, from(#2c2cff), to(#00042e));
background: -moz-linear-gradient(top, #2c2cff, #00042e);
background: linear-gradient(to bottom, #2c2cff, #00042e);
color: #ffffff;
text-decoration: none;
}
.button:active {
background: #161693;
background: -webkit-gradient(linear, left top, left bottom, from(#161693), to(#000326));
background: -moz-linear-gradient(top, #161693, #000326);
background: linear-gradient(to bottom, #161693, #000326);
}
和OP得到了工作! :) – sinisake
Thanx修復它:D – Osiris93