css+div布局实现仿ios底部磨砂导航栏的旅游图文列表效果代码
代码语言:html
所属分类:布局界面
代码描述:css+div布局实现仿ios底部磨砂导航栏的旅游图文列表效果代码
代码标签: css div 布局 ios 底部 磨砂 导航栏 旅游 图文 列表
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> * { font-family: BlinkMacSystemFont, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; } body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; touch-action: manipulation; position: relative; line-height: 1.4; margin: 0; text-wrap: pretty; display: flex; flex-direction: column; align-items: center; color: #fff; gap: 20px; } body:before { content: ""; position: fixed; background: linear-gradient(#0D0F1E, #573B62); inset: 0; z-index: -1; } button { all: unset; display: flex; align-items: center; justify-content: center; cursor: pointer; } .spacer { height: 180px; } h1 { margin: 0; flex-grow: 1; } header { display: flex; align-items: center; margin: 50px 0 10px; width: calc(100vw - 40px); max-width: 440px; } header button { width: 32px; height: 32px; border-radius: 16px; background: rgba(255, 255, 255, 0.15); gap: 3px; flex-direction: column; align-items: center; } header button i { width: 18px; display: block; height: 2px; border-radius: 1px; background: #fff; } header button i:nth-of-type(1) { width: 18px; margin-top: 2px; } header button i:nth-of-type(2) { width: 15px; } header button i:nth-of-type(3) { width: 12px; } .card { padding: 20px 0; background: rgba(255, 255, 255, 0.15); border-radius: 12px; width: calc(100vw - 8px - 40px); max-width: 440px; padding: 4px; } .card h2, .card p, .card span { padding: 0 12px; } .card h2 { margin: 16px 0 4px; font-size: 17px; } .card p { margin: 0 0 16px; font-size: 17px; line-height: 21px; } .card img { width: 100%; height: auto; border-radius: 8px; } .card .footer { display: flex; align-items: center; box-shadow: 0 -1px rgba(255, 255, 255, 0.13); padding-top: 4px; } .card .footer span { flex-grow: 1; font-size: 12px; font-weight: bold; color: rgba(255, 255, 255, 0.5); } .card .footer button { width: 46px; height: 24px; gap: 3px; align-items: center; } .card .footer button i { width: 4px; height: 4px; display: block; border-radius: 2px; background: rgba(255, 255, 255, 0.5); } nav { position: fixed; bottom: 0; left: 0; right: 0; height: 160px; z-index: 1; display: flex; align-items: center; justify-content: center; } nav:before { content: ""; inset: 0; display: block; -webkit-backdrop-filter: blur(30px) saturate(1.2); backdrop-filter: blur(30px) saturate(1.2); -webkit-mask-image: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.9) 80%, #000); mask-image: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.9) 80%, #000); position: absolute; pointer-events: none; } nav button { width: 72px; height: 72px; border-radius: 36px; position: relative; background: rgba(77, 75, 218, 0.9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 10px 20px 5px rgba(0, 0, 0, 0.1); } nav button:after, nav button:before { content: ""; display: block; position: absolute; height: 4px; width: 22px; border-radius: 2px; background: #fff; } nav button:before { transform: rotate(90deg); } </style> </head> <body translate.........完整代码请登录后点击上方下载按钮下载查看
网友评论0