首页 > 其他分享 >todo记事本

todo记事本

时间:2023-06-30 10:25:18浏览次数:32  
标签:color todo li item 5px border 记事本

<!DOCTYPE html> <html lang="en"> <head>     <meta charset="UTF-8">     <title>Todo List</title>     <style>         body {             background-color: #f6f6f6;             font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;             margin: 0;             padding: 0;         }
        .container {             max-width: 600px;             margin: 20px auto;             background-color: #fff;             border-radius: 10px;             box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);             padding: 20px;         }
        .header {             text-align: center;             margin-bottom: 20px;             color: #3f51b5;         }
        .todo-form {             display: flex;             align-items: center;             margin-bottom: 20px;         }
        .todo-input {             flex: 1;             padding: 10px;             border: none;             border-radius: 5px;             box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);         }
        .todo-button {             padding: 10px 20px;             border: none;             border-radius: 5px;             background-color: #3f51b5;             color: #fff;             cursor: pointer;         }
        .todo-list {             list-style: none;             padding: 0;         }
        .todo-item {             display: flex;             align-items: center;             padding: 10px;             border-radius: 5px;             margin-bottom: 10px;             background-color: #e8e8e8;             box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);         }
        .todo-item:last-child {             margin-bottom: 0;         }
        .todo-item-checkbox {             margin-right: 10px;         }
        .todo-item-text {             flex: 1;             color: #3f51b5;             font-weight: bold;         }
        .todo-item-delete {             padding: 5px 10px;             border: none;             border-radius: 5px;             background-color: #ff6b6b;             color: #fff;             cursor: pointer;             transition: background-color 0.3s;         }
        .todo-item-delete:hover {             background-color: #ff4f4f;         }     </style> </head> <body> <div class="container">     <h1 class="header">Todo List</h1>     <form class="todo-form" id="todoForm">         <input type="text" class="todo-input" placeholder="Add a new todo" id="todoInput">         <button type="submit" class="todo-button">Add</button>     </form>     <ul class="todo-list" id="todoList"></ul> </div> </body> </html> <script>     const todoForm=document.getElementById('todoForm')     const todoList=document.getElementById('todoList')     const todoInput=document.getElementById('todoInput')
    function createTodoItem(text){         const li=document.createElement('li')         li.className="todo-item"         li.innerHTML=`                     <input type="checkbox" class="todo-item-checkbox">                     <span class="todo-item-text">${text}</span>                     <button class="todo-item-delete">Delete</button>                     `         return li     }     todoForm.onsubmit=function(event){         event.preventDefault()//onsubmit事件应该跳转新网页,用这个取消跳转         const todoText=todoInput.value         if(!todoText)return         const li=createTodoItem(todoInput.value.trim())//trim去掉字符串头尾的空格         todoList.appendChild(li)//把生成的li放到ul里去         todoInput.value=""     }     todoList.onclick=function(event){         if(event.target.className=="todo-item-delete"&&confirm('Are you sure you want to delete this todo?'))         event.target.parentNode.remove()     } </script>

标签:color,todo,li,item,5px,border,记事本
From: https://www.cnblogs.com/tw22419/p/17515871.html

相关文章

  • MongoDB从入门到实战之.NET Core使用MongoDB开发ToDoList系统(8)-Ant Design Blazor前端
    前言前面的章节我们介绍了一些值得推荐的BlazorUI组件库,通过该篇文章的组件库介绍最终我选用AntDesignBlazor这个UI框架作为ToDoList系统的前端框架。因为在之前的工作中有使用过AntDesignVue、AntDesignAngular习惯并且喜欢AntDesign设计规范和风格,废话不多说今天我......
  • 【React工作记录一百一十二】React(Hook)+TS+axios+ant design+json server实现todoli
    前言大家好我是歌谣最近开始在做关于前端扫盲的一些只是处理花了一周左右录制了了一个hook写法的关于todoList的视频主要用于基础知识的一个使用和处理目录#前端巅峰人才交流群私信我#第一节创建项目todolist项目技术选型React(Hook)+TS+axios+antdesign+jsonserve......
  • hfile通过bulkload拷贝到hbase方式---TODO待整理
      参考链接: http://www.ithao123.cn/content-101658.html hbase之bulkload的主要类LoadIncrementalHFiles  http://www.thinksaas.cn/group/topic/233674/ bulkload执行mv和cp的区别 使用LoadIncrementalHFiles装载HFILE到HBASE的一点心得  : 数据入HBASE一般有......
  • 电脑记事本快捷键
    以下是电脑记事本常用的快捷键:新建文件:Ctrl+N打开文件:Ctrl+O保存文件:Ctrl+S另存为:Ctrl+Shift+S关闭文件:Ctrl+W撤销:Ctrl+Z重做:Ctrl+Y剪切:Ctrl+X复制:Ctrl+C粘贴:Ctrl+V全选:Ctrl+A查找:Ctrl+F替换:Ctrl+H插入时间/日期:F5选择字体:Ctrl+Shif......
  • pip install pycryptodome安装失败
    如下图所示,这里已经给出了明确的错误信息 执行:python-mpipinstall--upgradepip后再次安装即可 ......
  • TODO 怎么做一个SystemUI
    如果要从0做一个SystemUI,覆盖原来的SystemUI。什么是SystemUI:从UI上讲就是各种Window。从架构上说,就是各种SystemUI抽象类的各种实现,组成SystemUI。通过一个系统服务和SystemServer和系统交互,显示对应功能,如状态栏、通知、VolumeUI等。 TODO完善博客......
  • vue3+vant4+vuex4实现todolist备忘录案例
    案例图片如下:  1<van-cell-group>2<van-cell>3<van-row>4<van-colspan="20">5<van-field6:value="content"7@change="handl......
  • CNN autoencoder 进行异常检测——TODO,使用keras进行测试
    https://sefiks.com/2018/03/23/convolutional-autoencoder-clustering-images-with-neural-networks/https://blog.keras.io/building-autoencoders-in-keras.htmlhttps://www.kaggle.com/atom1231/keras-autoencoder-with-simple-cnn-kfold4-lb-1704 https://datascience.st......
  • 2023-06-02 练习算法 - TODO
    练习扫描线算法视频:基础算法(一)--扫描线_哔哩哔哩_bilibili391·NumberofAirplanesintheSky-LintCode【基础】“这个是扫描线的基础题,后面其他题目都是它的套娃。”253.会议室II-力扣(LeetCode)【MID】思路1:扫描线算法,很简单。复杂度分析:O(nlogn),空间:O(n)......
  • TODO
    现状,数据库脚本70多个,需要改造shell增加效率。前置:create表结构sql数据库账号密码。1.导出sql3.将翻译后的insert语句表添加_i18n后缀4.将建表语句的表增加i18n后缀2.在本地翻译后上传5.登录数据库,执行插入source/path/to/your/create.sql#执行insert.sql脚本sou......