11<!DOCTYPE html>
2- < html lang ="zh-Hant ">
3- < head >
4- < meta http-equiv ="Content-Type " content ="text/html; charset=UTF-8 ">
5- < title > 三碼中文輸入法模擬器</ title >
2+ < html lang ="zh-Hant "> < head > < meta http-equiv ="Content-Type " content ="text/html; charset=UTF-8 ">
3+
4+ < title > 三碼中文輸入法</ title >
5+ < link rel ="preconnect " href ="https://fonts.googleapis.com/ ">
6+ < link rel ="preconnect " href ="https://fonts.gstatic.com/ " crossorigin ="">
7+ < link href ="./3code2_files/css2 " rel ="stylesheet ">
68 < style >
9+ /* 基礎樣式與變數定義 */
710 : root {
811 --primary-color : # 3f51b5 ;
912 --primary-light : # 5c6bc0 ;
@@ -379,9 +382,11 @@ <h3>反向查詢 (輸入單一中文字)</h3>
379382
380383 // --- 鍵盤處理 ---
381384 const keyboardLayout = [
385+ [ '1' , '2' , '3' , '4' , '5' , '6' , '7' , '8' , '9' , '0' ] ,
382386 [ 'q' , 'w' , 'e' , 'r' , 't' , 'y' , 'u' , 'i' , 'o' , 'p' ] ,
383387 [ 'a' , 's' , 'd' , 'f' , 'g' , 'h' , 'j' , 'k' , 'l' , ';' ] ,
384- [ 'z' , 'x' , 'c' , 'v' , 'b' , 'n' , 'm' , ',' , '.' , '/' ]
388+ [ 'z' , 'x' , 'c' , 'v' , 'b' , 'n' , 'm' , ',' , '.' , '/' ] ,
389+ [ 'shift' , 'space' , 'backspace' ]
385390 ] ;
386391
387392 function createKeyboard ( ) {
@@ -390,6 +395,9 @@ <h3>反向查詢 (輸入單一中文字)</h3>
390395 row . forEach ( key => {
391396 const keyDiv = document . createElement ( 'div' ) ;
392397 keyDiv . classList . add ( 'key' ) ;
398+ if ( key === 'shift' || key === 'space' || key === 'backspace' ) {
399+ keyDiv . style . gridColumn = 'span 2' ;
400+ }
393401 keyDiv . dataset . key = key ;
394402 keyDiv . innerHTML = `<span class="key-text">${ key } </span>` ;
395403 keyboard . appendChild ( keyDiv ) ;
@@ -539,5 +547,4 @@ <h3>反向查詢 (輸入單一中文字)</h3>
539547 }
540548 } ) ;
541549 </ script >
542- </ body >
543- </ html >
550+ </ body > </ html >
0 commit comments