css+js实现iphone手机支持明暗模式切换的待办事项app代码
代码语言:html
所属分类:布局界面
代码描述:css+js实现iphone手机支持明暗模式切换的待办事项app代码,支持拖拽、进度设置、完成设置。
代码标签: css js iphone 手机 支持 明暗 模式 切换 待办 事项 app 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
Arial, sans-serif;
-webkit-tap-highlight-color: transparent;
}
body {
background-color: #f0f0f0;
color: #fff;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
transition: background-color 0.3s;
}
body.light-mode {
background-color: #f0f0f0;
}
body.dark-mode {
background-color: #121212;
}
.iphone {
width: 375px;
height: 812px;
background-color: #1c1c1e;
border-radius: 40px;
overflow: hidden;
position: relative;
box-shadow: 0 0 0 10px #2c2c2e, 0 0 0 13px #000, 0 20px 50px rgba(0, 0, 0, 0.5);
transition: background-color 0.3s, box-shadow 0.3s;
}
.light-mode .iphone {
background-color: #ffffff;
box-shadow: 0 0 0 10px #e0e0e0, 0 0 0 13px #bdbdbd,
0 20px 50px rgba(0, 0, 0, 0.2);
}
.notch {
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);
width: 200px;
height: 30px;
background-color: #000;
border-bottom-left-radius: 20px;
border-bottom-right-radius: 20px;
z-index: 1000;
}
.status-bar {
display: flex;
justify-content: space-between;
align-items: center;
padding: 5px 20px;
font-size: 14px;
background-color: rgba(0, 0, 0, 0.3);
transition: background-color 0.3s, color 0.3s;
}
.light-mode .status-bar {
background-color: rgba(255, 255, 255, 0.3);
color: #000;
}
.time {
font-weight: bold;
}
.icons span {
margin-left: 5px;
}
.app-container {
height: calc(100% - 30px);
overflow-y: auto;
padding: 20px;
color: #fff;
transition: color 0.3s;
}
.light-mode .app-container {
color: #000;
}
h1 {
font-size: 32px;
margin-bottom: 20px;
font-weight: 700;
}
#task-form {
display: flex;
margin-bottom: 20px;
}
#task-input {
flex-grow: 1;
padding: 10px;
border: none;
background-color: #2c2c2e;
color: #fff;
border-r.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0