主頁
CSS
CSS 偽類
Tryit:設定 :focus 偽類樣式
執行 ❯
建立您
自己的
網站
×
更改方向
儲存程式碼
更改主題,深色/淺色
前往 Spaces
<!DOCTYPE html> <html> <head> <style> input:focus { background-color: yellow; } </style> </head> <body> <form action="/action_page.php" method="get"> First name: <input type="text" name="fname"><br><br> Last name: <input type="text" name="lname"><br><br> <input type="submit" value="Submit"> </form> </body> </html>