vue实现一个简洁的电商购物车代码
代码语言:html
所属分类:电商
代码描述:vue实现一个简洁的电商购物车代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/all.5.15.3.css"> <style> #app { position: relative; width: 450px; height: 645px; display: flex; background: #b2cebb; flex-direction: column; align-items: center; overflow: hidden; border-radius: 20px; box-shadow: 0px 7px 25px rgba(140, 140, 140, 0.2); transition: 0.3s all ease; } #app .plants { position: absolute; display: flex; flex-direction: column; align-items: center; width: inherit; background: white; border-radius: 20px; box-shadow: 0px 7px 25px rgba(140, 140, 140, 0.2); } #app .plants .plant { display: flex; width: -webkit-max-content; width: -moz-max-content; width: max-content; border-radius: 20px; transition: 0.3s all ease; padding: 10px; margin: 20px 0; } #app .plants .plant:hover { box-shadow: 0px 7px 15px rgba(140, 140, 140, 0.2); } #app .plants .plant:hover img { transform: rotate(25deg) scale(1.45); } #app .plants .plant img { width: 100px; height: auto; border-radius: 20px; transition: 0.3s all ease; } #app .plants .plant .description { width: 180px; padding-left: 25px; } #app .plants .plant .description h4 { margin-top: 5px; } #app .plants .plant .description p { color: #8c8c8c; } #app .plants .plant .description .price { font-weight: 600; } #app .plants .plant .quantity { display: flex; flex-direction: column; align-items: center; justify-content: space-around; margin-left: 35px; padding: 0 20px; font-size: 18px; background: rgba(178, 206, 187, 0.3); border-radius: 20px; } #app .plants .plant .quantity .btn { border: none; background: none; color: #8c8c8c; transition: 0.3s all ease; cursor: pointer; } #app .plants .plant .quantity .btn:hover { transform: scale(1.45); } #app .plants .plant .quantity .number { font-weight: 600; -webkit-animation: scale 0.3s ease; animation: scale 0.3s ease; } #app .checkout { position: absolute; top: 520px; display: flex; flex-direction: column; align-items: center; justify-content: center; } #app .checkout .total { font-weight: 900; display: flex; align-items: flex-end; font-size: 20px; margin-bottom: 20px; } #app .checkout .total span { font-size: 24px; margin-left: 9px; } #app .checkout button { font-size: 18px; background: #f9a100; color: #fff; font-weight: 700; padding: 10px 100px; border: none; border-radius: 20px; transition: 0.3s all ease; cursor: pointer; } #app .checkout button:hover { box-shadow: 0px 7px 25px rgba(140, 140, 140, 0.2); } #app .checkout button:disabled { background-color: #8c8c8c; cursor: not-allowed; } #app .cart-checkout { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 480px; margin-top: 20px; } #app .cart-checkout .cart-plants { display: flex; height: 300px; } #app .cart-checkout p { font-size: 34px; font-weight: 600; text-align: center; width: 240px; } *:focus { outline-color: #f9a100; } body { display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 100vh; color: #424242; background-image: linear-gradient(to right top, #fff, #c8e6c9); } .fade-up-leave-active { transition: 0.6s all ease; } .fade-up-leave { transform: translateY(0); } .fade-up-enter, .fade-up-leave-to { transform: translateY(-500px); } .scale-enter-active { transition: 0.3s all ease; } .scale-leave-active { transition: 0.3s all ease; } .scale-enter, .scale-leave-to { transform: scale(1.2); } .opacity-leave-active { transition: 0.3s all ease; } .opacity-enter, .opacity-leave-to { transform: translateY(60px); opacity: 0; } .plants-group-leave-active { transition: 0.3s all ease; } .plants-group-enter, .plants-group-leave-to { transform: translateX(200px); opacity: 0; } .order-group-enter-active { transition: 2s all ease; } .order-group-enter, .order-group-leave-to { transform: translateX(-300px); opacity: 0; } .fa-instagram { position: absolute; color: #b2cebb; top: 3%; right: 2%; font-size: 38px; } .........完整代码请登录后点击上方下载按钮下载查看
网友评论0