vue菜单添加选择删除效果代码
代码语言:html
所属分类:其他
代码描述:vue菜单添加选择删除效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> @import url("https://fonts.googleapis.com/css?family=Open+Sans:300,400,700,800"); * { padding: 0; margin: 0; box-sizing: border-box; } body { background-color: #2ACA71; font-family: "Open Sans", sans-serif; padding-top: 10px; } .container { background-color: #D9D9D9; margin: 0 auto; width: 340px; box-shadow: 0 0 15px rgba(0, 0, 0, 0.3); } header { background-color: #2ACA71; color: #fff; display: flex; justify-content: center; padding: 25px 15px; border-bottom: 1px solid #ceb7c4; } header h1 { font-weight: 300; } .settings { display: flex; width: 100%; padding: 15px 15px; background-color: #fafafa; color: #6B6B6B; justify-content: space-between; align-items: center; border-bottom: 5px solid #BDBDBD; position: relative; } .settings .full-cart { bottom: -5px; left: 0; position: absolute; content: ""; height: 5px; background-color: #3D6464; transition: all 0.5s; } .settings .full-cart.fulled { background-color: #1d8b4e; height: 6px; } .settings .count-list { display: flex; align-items: center; border-right: 3px solid #6B6B6B; padding-right: 10px; } .settings .count-list svg { height: 20px; width: 20px; margin-right: 5px; } .settings .count-list span { font-size: 1em; } .settings .form-new-item { width: 60%; } .settings .form-new-item input { outline: none; border: none; width: 60%; font-size: 1em; color: #6B6B6B; background-color: #fafafa; } .settings .form-new-item button { background: none; border: none; outline: none; font-size: 1em; font-weight: 700; color: #1BC768; cursor: pointer; border-bottom: 2px solid #BDBDBD; } .content-list { padding: 20px 15px; } .content-list .item { background-color: #fafafa; border: 1px solid #BDBDBD; padding: 20px 15px; display: flex; justify-content: space-between; margin-bottom: 15px; transition: all 0.5s; } .content-list .item.done { background-color: #2ACA71; transition: all 0.5s; } .content-list .full-items { background-color: tomato; justify-content: center; border-width: 0; padding: 0; height: 0; opacity: 0; margin-bottom: 0; } .content-list .full-items.active { border-width: 1; margin-bottom: 15px; padding: 20px 15px; height: 100%; opacity: 1; } .content-list .full-items .item-text h3 { color: #fff; text-align: center; } .content-list .check-item { position: relative; } .content-list .check-item span { display: flex; align-items: center; justify-content: center; padding: 6px 7px; background-color: #2ACA71; color: #fff; } .content-list .check-item svg { height: 20px; width: 20px; } .content-list .check-item svg path { fill: #21a059; transition: all 0.75s; } .content-list .check-item input[type=checkbox] { width: 25px; height: 25px; background-color: #2ACA71; position: absolute; z-index: 1; top: 0; left: calc(50% - 10px); opacity: 0; cursor: pointer; } .content-list .check-item input[type=checkbox]:checked + span svg { transform: scale(1.2); transition: all 0.75s; } .content-list .check-item input[type=checkbox]:checked + span path { fill: #fafafa; transition: all 0.75s; } .content-list .item-text { width: 70%; } .content-list .item-text h3 { text-align: left; color: #5D5D5D; } .content-list .item-action { display: flex; justify-content: center; align-items: center; } .content-list .item-action button { background: none; border: none; cursor: pointer; opacity: 0; visibility: hidden; transition: all 0.5s; } .content-list .item-action button.active { opacity: 1; visibility: visible; transition: all 0.5s; } .content-list .item-action button:hover svg { transform: scale(1.2); transition: all 0.5s; } .content-list .item-action svg { transition: all 0.5s; height: 15px; width: 15px; } </style> </head> <body > <main id="app" class="container"> <header> <h1>{{ title }}</h1> </header> <div class="settings"> <div class="count-list"> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" width="453.73px" height="453.73px" viewBox="0 0 453.73 453.73" style="fill: rgb(107, 107, 107);" xml:space="preserve"> <g style="fill: rgb(107, 107, 107);"> <path d="M447.664,129.262c-5.005-6.031-12.435-9.521-20.271-9.521h-20.86l4.734-4.733c1.641-1.642,2.562-3.867,2.562-6.188 c0-2.321-0.922-4.547-2.562-6.188l-48.674-48.673c-3.415-3.417-8.956-3.416-12.375,0.001l-56.886,56.887v-50.7 c0-4.832-3.918-8.75-8.75-8.75H174.265c-4.832,0-8.75,3.918-8.75,8.75v59.511c0,0.028,0.004,0.056,0.004,0.083h-34.664 l-2.876-14.948c-1.838-9.543-8.78-17.301-18.063-20.18L34.149,61.111C20.257,56.802,5.5,64.571,1.189,78.465 c-4.31,13.894,3.461,28.65,17.354,32.96l60.689,18.824l46.254,202.948c1.612,8.584,7.281,15.535,14.797,19.027 c-0.223,1.806-0.352,3.639-0.352,5.501c0,24.599,20.013,44.609,44.61,44.609c24.597,0,44.61-20.012,44.61-44.609 c0-1.026-0.047-2.042-0.117-3.052h70.424c-0.067,1.01-0.115,2.024-0.115,3.052c0,24.599,20.012,44.609,44.608,44.609 c24.599,0,44.609-20.012,44.609-44.609c0-1.101-0.054-2.187-0.132-3.267c11.271-1.366,20.564-9.866,22.704-21.263l42.145-182.255 C454.726,143.239,452.667,135.293,447.664,129.262z M184.543,379.451c-11.979,0-21.727-9.746-21.727-21.727 c0-11.979,9.748-21.727,21.727-21.727c11.979,0,21.727,9.747,21.727,21.727C206.27,369.705,196.522,379.451,184.543,379.451z M343.953,379.451c-11.979,0-21.725-9.746-21.725-21.727c0-11.979,9.745-21.727,21.725-21.727c11.98,0,21.727,9.747,21.727,21.727 C365.68,369.705,355.934,379.451,343.953,379.451z M359.263,289.074H178.754c-8.729,0-15.804-7.076-15.804-15.805 c0-8.728,7.075-15.803,15.804-15.803h180.509c8.729,0,15.804,7.075,15.804,15.803C375.067,281.........完整代码请登录后点击上方下载按钮下载查看
网友评论0