JS-记事本(代码)
提示:该代码可直接使用,点击左边“+”号,新建一个记事本,在左边输入标题及标题后,点击保存,即会生成一个新的记事本,点击已有的记事本,可以对其进行编辑,编辑后可重新进行保存。(在没有需要编辑的记事本内容时,左边所有按钮不可用)
其中所使用的记事本图标:
也可根据自己需求自定义。
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
*{
box-sizing: border-box;
}
ul{
margin: 0;
padding: 0;
list-style: none;
}
body,p{
margin: 0;
}
.all{
width: 100vw;
height: 100vh;
padding: 60px;
display: flex;
}
.all aside{
width: 300px;
border: 1px #000 solid;
height:100%;
margin-right: 40px;
padding: 20px;
}
.all aside input,.all aside textarea{
width: 100%;
}
.all aside textarea{
resize: none;
height: 300px;
}
.btn{
display: flex;
height: 100px;
justify-content: space-between;
align-items: center;
}
.all button{
width: 120px;
height: 40px;
border-radius: 15px;
font-size: 26px;
}
.content{
flex: 1;
height:100%;
border: 1px #000 solid;
padding: 20px;
overflow: hidden;
}
.text_list li{
width: 120px;
float: left;
margin: 0