2015-04-22 22 views
0

我只是使用登錄創建自己的網站,並且必須輸入文本類型的標籤。我只是想點擊它們時鼠標在其他地方出現邊框。
我希望有人能幫助我 預先感謝您點擊OnClick輸入時會出現邊框

編輯:
HTML代碼

<form action="login.php" method="post"> 
    <input class="login" name="user" type="text" placeholder="Benutzername"> 
    <input class="login_pw" name="password" type="password" placeholder="Passwort"><br> 
    <br><input class="submit" name="login" value="Anmelden" type="submit"> 
</form> 

CSS代碼

.login { 
    width: 250px; 
    height: 40px; 
    color: white; 
    font-family: Arial; 
    font-size: 20px; 
    font-weight: bold; 
    text-align: center; 
    background-color: #2E2E2E; 
    border-bottom: 1px solid orange; 
    border-top: none; 
    border-left: none; 
    border-right: none; 
} 

.login_pw { 
    width: 250px; 
    height: 40px; 
    color: white; 
    font-family: Arial; 
    font-size: 20px; 
    font-weight: bold; 
    text-align: center; 
    border-bottom: 1px solid orange; 
    border-top: none; 
    border-left: none; 
    border-right: none; 
    margin-left: 20px; 
    background-color: #2E2E2E; 
} 
+3

請發表你的嘗試/代碼,所以我們可以詳細看看它。 – shadoweye14

回答

0

試着在CSS添加此:

**input.middle:focus { 
    outline-width: 0; 
}** 

input:focus, 
select:focus, 
textarea:focus, 
button:focus { 
    outline: none; 
}