效果预览:https://sevlt.github.io/to-do-list-mobile-terminal/index.html
Html 代码:
<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Todo</title> <link rel="stylesheet" href="./css/reset.min.css" /> <link rel="stylesheet" href="./css/style.css" /> </head> <body> <header> <input type="text" placeholder="输入待办事项..." id="item" /> <button id="add"> <!-- 添加按钮 SVG --> <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 16 16" style="enable-background: new 0 0 16 16;" xml:space="preserve" > <g> <path class="fill" d="M16,8c0,0.5-0.5,1-1,1H9v6c0,0.5-0.5,1-1,1s-1-0.5-1-1V9H1C0.5,9,0,8.5,0,8s0.5-1,1-1h6V1c0-0.5,0.5-1,1-1s1,0.5,1,1v6h6C15.5,7,16,7.5,16,8z" /> </g> </svg> </button> </header> <div class="co