jquery+css实现人物头像点击文字介绍卡片变换tab选项卡效果代码
代码语言:html
所属分类:选项卡
代码描述:jquery+css实现人物头像点击文字介绍卡片变换tab选项卡效果代码
代码标签: jquery css 人物 头像 点击 文字 介绍 卡片 变换 tab 选项卡
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <link href="https://fonts.googleapis.com/css2?family=Nunito:wght@200;300;400;600;700&display=swap" rel="stylesheet"> <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/bootstrap.4.3.1.min.css"> <style> body { font-size: 100%; font-family: "Nunito", sans-serif; margin: 0; padding: 0; background: linear-gradient(250.48deg, #161616 22.86%, #303030 99.18%); width: 100%; height: 100vh; } img { width: 100%; max-width: 100%; vertical-align: middle; } #box_area { width: 100%; height: 100%; position: absolute; top: 0; left: 0; overflow: hidden; margin: 0; padding: 0; } .block { position: absolute; display: block; list-style: none; width: 200px; height: 200px; top: 50%; left: 50%; background: #01c0da; filter: blur(15px); border-radius: 50%; opacity: 0.7; } #box_area .block:nth-child(1) { width: 15vh; height: 15vh; top: 50%; left: 24%; transition: 1s; opacity: 0.7; transition-timing-function: ease-in-out; } #box_area .block:nth-child(2) { width: 10vh; height: 10vh; top: 23%; left: 72%; transition: 1.7s; opacity: 0.7; transition-timing-function: ease-in-out; } #box_area .block:nth-child(3) { width: 25vh; height: 25vh; top: 11%; left: 49%; transition: 1.7s; opacity: 0.5; transition-timing-function: ease-in-out; } #box_area .block:nth-child(4) { width: 70vh; height: 70vh; top: 48%; left: 67%; transition: 1.7s; opacity: 0.2; transition-timing-function: ease-in-out; } #box_area .block:nth-child(5) { width: 50vh; height: 50vh; top: 8%; left: 4%; transition: 1.3s; opacity: 0.4; transition-timing-function: ease-in-out; } #box_area .block:nth-child(6) { width: 22vh; height: 22vh; top: 72%; left: 34%; transition: 1.3s; opacity: 0.6; transition-timing-function: ease-in-out; } #box_area.card-zara-bg .block:nth-child(1) { top: 50%; left: 25%; } #box_area.card-zara-bg .block:nth-child(2) { top: 36%; left: 72%; } #box_area.card-zara-bg .block:nth-child(3) { top: 11%; left: 58%; } #box_area.card-zara-bg .block:nth-child(4) { top: 28%; left: 73%; } #box_area.card-zara-bg .block:nth-child(5) { top: 10%; left: 10%; } #box_area.card-zara-bg .block:nth-child(6) { top: 68%; left: 41%; } #box_area.card-bruce-bg .block:nth-child(1) { top: 74%; left: 29%; } #box_area.card-bruce-bg .block:nth-child(2) { top: 52%; left: 66%; } #box_area.card-bruce-bg .block:nth-child(3) { top: 11%; left: 58%; } #box_area.card-bruce-bg .block:nth-child(4) { top: -2%; left: 73%; } #box_area.card-bruce-bg .block:nth-child(5) { top: 17%; left: 4%; } #box_area.card-bruce-bg .block:nth-child(6) { top: 68%; left: 53%; } #box_area.card-jim-bg .block:nth-child(1) { top: 78%; left: 10%; } #box_area.card-jim-bg .block:nth-child(2) { top: 27%; left: 59%; } #box_area.card-jim-bg .block:nth-child(3) { top: 5%; left: 67%; } #box_area.card-jim-bg .block:nth-child(4) { top: 1%; left: 77%; } #box_area.card-jim-bg .block:nth-child(5) { top: 13%; left: 18%; } #box_area.card-jim-bg .block:nth-child(6) { top: 58%; left: 57%; } .menu { position: absolute; width: 150px; height: 50%; margin: 0; padding: 0; left: 0; z-index: 5; top: 50%; left: 2%; transform: translate(0, -50%); } .menu li { width: 70px; height: 70px; border-radius: 50%; position: relative; margin-bottom: 20px; list-style-type: none; transition: 0.5s; background-repeat: no-repeat; background-position: center; animation-timing-function: ease-out; box-shadow: 11px 11px 15px -2px rgba(0, 0, 0, 0.25); cursor: pointer; z-index: 10; } .menu li.martin { background-image: url("//repo.bfw.wiki/bfwrepo/image/5e0c6fb85d0a5.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_90,h_90,/quality,q_90"); } .menu li.zara { background-image: url("//repo.bfw.wiki/bfwrepo/image/60d41f5173b0d.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_90,h_90,/quality,q_90"); } .menu li.bruce { background-image: url("//repo.bfw.wiki/bfwrepo/image/61e27364c2151.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_90,h_90,/quality,q_90"); } .menu li.jim { background-image: url("//repo.bfw.wiki/bfwrepo/image/61de6e39623c8.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_90,h_90,/quality,q_90"); } .menu li.selected { border: rgba(224, 224, 224, 0.3) 4px solid; } section { display: flex; justify-content: center; width: 100%; height: 100%; align-items: center; } .card { position: relative; width: 300px; height: 450px; background: linear-gradient(210deg, rgba(224, 224, 224, 0.3) 0, rgba(36, 34, 34, 0.1) 97%); border-radius: 40px; backdrop-filter: blur(30px); transform-origin: right; transform-style: preserve-3d; display: none; transform: perspective(300px) rotateY(-30deg); } .card__inner { position: relative; width: 100%; height: 100%; padding: 10%; } .card__inner .card__photo { position: absolute; left: -10%; width: 140px; height: 140px; border-radius: 50%; margin-bottom: 20px; background-repeat: no-repeat; background-position: center; list-style-type: none; border: rgba(224, 224, 224, 0.3) 3px solid; transition: 0.5s; animation-timing-function: ease-out; box-shadow: 17px 17px 17px -2px rgba(0, 0, 0, 0.25); } .card__inner .card__name { width: 100%; height: 40%; text-align: right; color: rgba(229, 229, 229, 0.7); line-height: 3.5em; } .card__inner .card__about { position: relative; width: 100%; height: 60%; font-size: 0.8rem; text-align: justify; color: rgba(229, 229, 229, 0.5); font-weight: 200; letter-spacing: 0.15em; } .card__inner .card__about span { display: inline-block; position: relative; bottom: 0; width: 100%; text-align: center; font-size: 1.1rem; margin-top: 15px; color: rgba(1, 192, 218, 0.7); } .show-card { display: table; animation: card_change 2s both; } .show-card .card__photo { animation: card_photo_change 2s both; } @keyframes card_photo_change { 0% { box-shadow: 94px 17px 32px 0 rgba(0, 0, 0, 0.25); left: -65%; transform: scale(1.2); } 50% { box-shado.........完整代码请登录后点击上方下载按钮下载查看
网友评论0