css+div实现待办事项ui布局设计代码
代码语言:html
所属分类:布局界面
代码描述:css+div实现待办事项ui布局设计代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <link rel='stylesheet' href='https://fonts.googleapis.com/icon?family=Material+Icons'> <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/reset.min.css"> <style> @charset "UTF-8"; :root { --primary-color: rgba(0,139,125,1); } *, *:before, *:after { box-sizing: border-box; outline: none; } html { font-family: "Source Sans Pro", sans-serif; font-size: 16px; font-smooth: auto; font-weight: 300; line-height: 1.5; color: #444; } button { cursor: pointer; } body { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; background: var(--primary-color); transition: background 0.5s ease; } .title { margin: 3.125rem 0 1.25rem; color: rgba(245, 245, 245, 0.5); font-size: 1.25rem; font-weight: bold; text-transform: uppercase; } .theme { position: fixed; bottom: 2.5rem; left: 2.5rem; margin: 0; padding: 0.625rem 1.25rem; border: 0; font-weight: bold; text-transform: uppercase; box-shadow: 0.1875rem 0.1875rem 0 rgba(245, 245, 245, 0.4); transition: 0.25s; cursor: pointer; } .theme:hover { box-shadow: 0rem 0rem 0 rgba(245, 245, 245, 0.4); } .menu { position: relative; display: flex; align-items: center; justify-content: flex-start; width: 31.25rem; height: 3.125rem; background-color: white; border-radius: 0.625rem; box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23); overflow: hidden; z-index: 11; } .menu .menu-button { position: absolute; display: flex; align-items: center; justify-content: center; width: 4.6875rem; height: 3.125rem; background-color: white; border: 0; border-radius: 0.625rem 0 0 0.625rem; box-shadow: 0.25rem 0 1.25rem rgba(34, 34, 34, 0.2); z-index: 99; } .menu .menu-button:after { position: absolute; content: ""; left: 100%; width: 0; height: 0; border-left: 0.625rem solid white; border-top: 1.55rem solid transparent; border-bottom: 1.55rem solid transparent; border-radius: 0 0.625rem 0 0; } .menu .menu-button > span { position: relative; display: block; width: 1.5rem; height: 0.125rem; background: var(--primary-color); } .menu .menu-button > span:before, .menu .menu-button > span:after { position: absolute; content: ""; left: 0; width: 1.5rem; height: 0.125rem; background: var(--primary-color); transition: 0.25s; } .menu .menu-button > span:before { top: -0.375rem; } .menu .menu-button > span:after { top: 0.375rem; } .menu .text { position: absolute; left: 20%; color: var(--primary-color); font-size: 0.75rem; font-weight: bold; line-height: 0; text-transform: uppercase; opacity: 1; transition: 0.15s; } .menu .date { position: absolute; right: 1.25rem; color: #888888; font-size: 0.75rem; font-weight: bold; text-align: right; text-transform: uppercase; } .menu .date .time { color: var(--primary-color); font-size: 0.875rem; } .menu .date .time .colon { position: relative; display: inline-block; width: 1px; margin-left: -0.25rem; } .menu .nav { position: relative; display: flex; align-items: center; justify-content: flex-start; width: 0%; height: 100%; margin: 0; padding: 0; transition: 0.25s; } .menu .nav > li { position: absolute; left: -25px; display: flex; align-items: center; justify-content: center; width: 25%; height: 100%; background: white; opacity: 0; transition: 0.5s; } .menu .nav > li:nth-of-type(1) { z-index: calc(10 - 1); } .menu .nav > li:nth-of-type(2) { z-index: calc(10 - 2); } .menu .nav > li:nth-of-type(3) { z-index: calc(10 - 3); } .menu .nav > li:nth-of-type(4) { z-index: calc(10 - 4); } .menu.open .menu-button > span { height: 0.125rem; background-color: transparent; transform-origin: center center; } .menu.open .menu-button > span:before, .menu.open .menu-button > span:after { position: absolute; content: ""; left: 0; width: 1.5rem; height: 0.125rem; background: var(--primary-color); transition: 0.25s; } .menu.open .menu-button > span:before { top: 0; transform: rotate(45deg); } .menu.open .menu-button > span:after { top: 0; transform: rotate(-45deg); } .menu.open .text { left: 0; opacity: 0; transition: 0.15s; } .menu.open .nav { width: 100%; padding-left: 4.5rem; transition: 0.25s; } .menu.open .nav > li { position: relative; left: 0; box-shadow: 0.25rem 0 1.25rem rgba(34, 34, 34, 0.2); opacity: 1; transition: 0.25s; } .menu.open .nav > li:after { position: absolute; content: ""; left: 100%; width: 0; height: 0; border-left: 0.625rem solid white; border-top: 1.55rem solid transparent; border-bottom: 1.55rem solid transparent; border-radius: 0 0.625rem 0 0; transition: 0.25s; } .menu.open .nav > li:hover { background: var(--primary-color); } .menu.open .nav > li:hover:after { border-left: 0.625rem solid var(--primary-color); } .menu.open .nav > li:hover button { color: white; } .menu.open .nav > li > button { position: relative; display: block; margin: 0; background-color: transparent; border: none; color: var(--primary-color); font-size: 0.75rem; font-weight: bold; text-decoration: none; text-transform: uppercase; } .tasks { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; width: 100%; height: 0; overflow: hidden; } .open .tasks { height: 100%; } .tasks .task { position: relative; display: flex; align-items: center; justify-content: space-between; width: 100%; margin: 0 0 1.25rem; padding: 0 0.625rem 0.75rem; border-bottom: 0.0625rem solid rgba(34, 34, 34, 0.1); } .tasks .task:before { position: absolute; content: ""; top: 30%; left: 0; width: 0%; height: 0.125rem; background-color: #388E3C; transition: width 0.5s ease; z-index: 9; } .tasks .task.task-complete { color: #388E3C; } .tasks .task.task-complete:before { width: 100%; } .tasks .task .task-check, .tasks .task .task-name, .tasks .task .task-move { position: relative; display: flex; align-items: center; justify-content: center; } .tasks .task .task-name { justify-content: flex-sta.........完整代码请登录后点击上方下载按钮下载查看
网友评论0