css实现简洁自适应导航条效果代码
代码语言:html
所属分类:菜单导航
代码描述:css实现简洁自适应导航条效果代码,在手机上会显示竖的
下面为部分代码预览,完整代码请点击下载或在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.6.0.css"> <style> @import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400;500&display=swap"); :root { --highlight: #5756e6; } * { box-sizing: border-box; } body { background-color: #a4b1e6; display: flex; justify-content: center; align-items: center; height: 100vh; font-family: "Inter", sans-serif; } .navbar { border-radius: 32px; background-color: white; display: flex; justify-content: space-between; width: 100%; max-width: 400px; box-shadow: 0 14px 28px #8f9cd4, 0 10px 10px #8f9cd4; } .list-item { list-style-type: none; flex-basis: 100%; min-height: 80px; display: flex; align-items: center; justify-content: center; position: relative; color: #555; transform: translateY(0); transition: transform 0.5s ease, opacity 0.2s ease; cursor: pointer; } .list-item-name { font-size: 13px; font-weight: 500; position: absolute; transform: translate(0, 50px); transition: transform 0.5s ease, opacity 0.2s ease; opacity: 0; } .........完整代码请登录后点击上方下载按钮下载查看
网友评论0