js+css布局实现类似安居客房产中介平台app的可交互跳转ui原型效果代码
代码语言:html
所属分类:布局界面
代码描述:js+css布局实现类似安居客房产中介平台app的可交互跳转ui原型效果代码
代码标签: js css 布局 类似 安居客 房产 中介 平台 app 交互 跳转 ui 原型图
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<title>安居客 - 房产中介App</title>
<style>
:root {
--primary-color: #00AE66;
--primary-light: #e6f7f0;
--accent-color: #FF5A5F;
--bg-color: #f7f8fa;
--text-primary: #1a1a1a;
--text-secondary: #8a8a8a;
--border-color: #ebedf0;
--card-bg: #ffffff;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
body { font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif; background-color: var(--bg-color); color: var(--text-primary); font-size: 14px; }
.page {
position: absolute; top: 0; left: 0; width: 100%; height: 100vh;
background-color: var(--bg-color); display: none; flex-direction: column;
transform: translateX(100%); transition: transform 0.3s ease-out;
}
.page.active { display: flex; transform: translateX(0); z-index: 10; }
#app-container.active { display: flex; transform: translateX(0); z-index: 5; }
/* --- 通用头部 --- */
.page-header {
display: flex; align-items: center; justify-content: space-between;
height: 50px; padding: 0 15px; background-color: var(--card-bg);
border-bottom: 1px solid var(--border-color); flex-shrink: 0;
}
.page-header h2 { font-size: 18px; position: absolute; left: 50%; transform: translateX(-50%); }
.page-header .icon-btn { cursor: pointer; background: none; border: none; }
.page-header svg { width: 24px; height: 24px; }
/* --- 内容区域 --- */
.content { flex-grow: 1; overflow-y: auto; }
#home-page .content { padding: 15px; }
#listings-page .content, #favorites-page .content, #agent-page .content { padding: 0 15px; }
#detail-page .content { padding-bottom: 70px; }
/* --- 首页 --- */
.search-bar { display: flex; align-items: center; background-color: var(--card-bg); padding: 8px 15px; border-radius: 20px; margin-bottom: 20px; }
.search-bar svg { color: var(--text-secondary); margin-right: 8px; }
.search-bar span { color: var(--text-secondary); }
.nav-categories { display: flex; justify-content: space-around; text-align: center; margin-bottom: 25px; }
.nav-cat-item { cursor: pointer; }
.nav-cat-item div { width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 8px; }
.nav-cat-item:nth-child(1) div { background-color: #2b83f8; }
.nav-cat-item:nth-child(2) div { background-color: #36c57d; }
.nav-cat-item:nth-child(3) div { background-color: #f7a012; }
.nav-cat-item svg { width: 28px; height: 28px; color: white; }
.section-title { font-size: 18px; font-weight: bold; margin-bottom: 15px; }
/* --- 房源列表项 --- */
.listing-item {
display: flex; padding: 15px 0; background-color: var(--card-bg);
margin-bottom: 10px; border-radius: 8.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0