amaze布局模仿pc端微信聊天窗口ui交互效果代码
代码语言:html
所属分类:布局界面
代码描述:amaze布局模仿pc端微信聊天窗口ui交互效果代码,左侧tab选项卡可切换,包括联系人、收藏夹、最近的消息,消息发送,设置等操作。
代码标签: amaze 布局 模仿 pc端 微信 聊天 窗口 ui 交互 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum=1.0,minimum=1.0,user-scalable=0" /> <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/amazeui.min.css"> <style> body{ background-size: 100% 100%; height: 100vh; -webkit-user-select:none; -moz-user-select:none; -ms-user-select:none; user-select:none; } ::-webkit-scrollbar { width:5px; } /* 这是针对缺省样式 (必须的) */ ::-webkit-scrollbar-track { background-color:rgba(0,0,0,0); border-radius:10px; } /* 滚动条的滑轨背景颜色 */ ::-webkit-scrollbar-thumb { background-color: rgba(0, 0, 0, 0.1); border-radius:10px; } /* 滑块颜色 */ ::-webkit-scrollbar-button { background-color:rgba(0,0,0,0); height: 0; } /* 滑轨两头的监听按钮颜色 */ ::-webkit-scrollbar-corner { background-color: black; } /* 横向滚动条和纵向滚动条相交处尖角的颜色 */ p{ margin: 0; } ul{ margin: 0; padding: 0; } ul li{ list-style-type: none; } .box{ background-image: url(//repo.bfw.wiki/bfwrepo/image/6430c7d5ddf77.png); background-repeat: no-repeat; width: 100%; height: 100%; background-position: center center; background-size: cover; display: flex; justify-content: center; align-items: center; } .wechat{ width:860px; height:680px; background: #fff; box-shadow: 0 0 8px rgba(0,0,0,.1); border-radius:4px; overflow: hidden; } .sidestrip{ width: 60px; background:#2a2e32; float: left; height: 100%; border-radius: 4px 0 0 4px; padding-top:20px; position: relative; } .own_head{ width: 34px; height: 34px; margin-left: 13px; border-radius: 2px; background: url(//repo.bfw.wiki/bfwrepo/image/60d41f5173b0d.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_100,h_100,/quality,q_90); background-size:34px; } .am-dropdown-content{ width: 300px; margin-left: 20px; border:none; border-radius: 4px; box-shadow: 0 0 8px rgba(0,0,0,.1); padding: 30px; top:0px; left:32px; } .am-dropdown-content:after, .am-dropdown-content:before{ display: none; } .own_head_top{ width: 100%; display: inline-block; border-bottom: 1px solid #f4f4f4; padding-bottom: 25px; } .own_name{ font-size: 18px; color: #333; margin-bottom:6px; } .own_name > img{ width: 14px; margin-left: 8px; margin-top:3px; } .own_numb{ font-size:14px; color: #999; } .own_head_top > img{ width: 60px; float: right; } .own_head_top_text{ float: left; } .own_head_bottom{ padding-top: 20px; } .own_head_bottom p{ color: #333; } .own_head_bottom p > span{ color: #999; margin-right: 10px; } .own_head_bottom_img{ display: inline-block; float: right; margin-top: 10px; } .own_head_bottom_img a img{ margin-left:20px; } #si_1{ background: url(//repo.bfw.wiki/bfwrepo/images/chat/head_2.png) no-repeat; } #si_2{ background: url(//repo.bfw.wiki/bfwrepo/images/chat/head_3.png) no-repeat; } #si_3{ background: url(//repo.bfw.wiki/bfwrepo/images/chat/head_4.png) no-repeat; } .sidestrip_icon{ margin-top: 30px; padding: 0 18px; width:60px; } .sidestrip_icon a{ width: 100%; height:24px; display: block; margin-bottom: 30px; } .active{ background: url(//repo.bfw.wiki/bfwrepo/image/60d41f497bade.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_100,h_100,/quality,q_90) no-repeat !important; } .sidestrip_bc{ background:url(//repo.bfw.wiki/bfwrepo/images/chat/head_5.png) no-repeat; position: absolute; bottom: 20px; width: 16px; height: 13px; left: 22px; } ul.am-dropdown-content{ padding: 0; bottom:10px; top: auto; left: 40px; background:#393d40; width: auto; border-radius: 0; } ul.am-dropdown-content>li>a{ color:#fff; } ul.am-dropdown-content>.am-active>a, ul.am-dropdown-content>.am-active>a:focus, ul.am-dropdown-content>.am-active>a:hover{ color: #fff; text-decoration: none; outline: 0; background-color: #333; } ul.am-dropdown-content>li>a:focus, ul.am-dropdown-content>li>a:hover{ text-decoration: none; color: #fff; background-color: #333; } .am-dimmer{ z-index: 0; background-color:rgba(0,0,0,0); } .middle{ width:250px; height: 100%; float: left; background: #e6e5e5; overflow: hidden; display: none; } .on{ display:block; } .user_list, .friends_list, .icon_list{ width: 100%; } .wx_search{ padding:25px 12px 12px 12px; display: inline-block; width: 100%; float:inherit; } .wx_search input{ width: 190px; height: 25px; background:#e5e2e2; border: 1px solid #d9d7d6; padding-left: 5px; outline: 0; float: left; } .wx_search button{ font-size:20px; font: initial; background:#e5e2e2; border: 1px solid #d9d7d6; float: right; color: #585858; outline: 0; height: 25px; width: 25px; } .wx_search button:hover{ background:#d0d0d0; border: 1px solid #b9b6b5; } .user_list li{ width: 100%; height: 64px; padding: 12px; } .friends_list li{ width: 100%; padding-top: 12px; border-bottom:1px solid #dddbdb; } .user_list li:hover, .icon_list li:hover{ background:#dedbdb; } .friends_box:hover{ background:#dedbdb; } .user_head{ background: #999; height: 40px; width: 40px; border-radius:2px; float:left; overflow: hidden; } .user_head img{ width: 40px; } .user_text{ float: left; height: 40px; width: 120px; padding-left: 8px; } .friends_text{ float: left; line-height: 40px; width: 180px; padding-left: 8px; } .friends_text p{ overflow: hidden; text-overflow:ellipsis; white-space: nowrap; } .user_text p{ line-height: 20px; overflow: hidden; text-overflow:ellipsis; white-space: nowrap; } .user_name{ color: #333; font-size: 14px; } .user_message{ color: #999; font-size: 12px; } .user_time{ float: right; color: #999; font-size: 12px; } .zUIpanelScrollBox,.zUIpanelScrollBar{ width:7px; top:4px; right:0px; border-radius:5px; } .zUIpanelScrollBox{ background:black; opacity:0; filter:alpha(opacity=5); } .zUIpanelScrollBar{ background:rgba(0,0,0,.1); filter:alpha(opacity=80); } .office_text{ width: 100%; height:calc(100% - 62px); position: relative; display: inline-block; } .friends_list li > p{ font-size: 12px; color: #999; line-height: 26px; padding-left: 12px; } .friends_box{ padding: 12px 0; width: 100%; padding-left: 12px; display:flex; } .icon_list li{ width: 100%; height: 40px; } .icon{ float: left; height:100%; width:50px; position: relative; } .icon_list li span{ display: inline-block; line-height: 40px; } .icon img{ position: absolute; left: 50%; top: 50%; transform:translate(-50%,-50%); } .icon_active, .user_active{ background:#dedbdb; } /*******聊天窗口******/ .talk_window{ width:550px; height: 100%; float: left; background: #f5f5f5; } .windows_top{ padding-top:10px; height: 62px; border-bottom: 1px solid #e7e7e7; } .windows_top_box > span{ font-size: 18px; color: #333; line-height: 52px; padding-left: 30px; display: inline-block; } .windows_top_box{ width: 100%; height: 100%; position: relative; } .window_icon{ position:absolute; top:-10px; right: 0; } .window_icon li{ float: left; width:34px; height: 26px; position: relative; } .window_icon li:hover{ background: #e3e3e3; } .window_icon li a img{ position: absolute; left: 50%; top: 50%; transform:translate(-50%,-50%); } .extend{ position: absolute; right:14px; top: 20px; width: 18px; height: 16px; background: url(//repo.bfw.wiki/bfwrepo/images/chat/icon11.png) center center no-repeat; cursor:pointer; } .extend:hover{ background: url(//repo.bfw.wiki/bfwrepo/images/chat/icon12.png) center center no-repeat; } .windows_input{ border-top: 1px solid #ececec; height: 145px; width: 100%; } .windows_body{ height: 473px; width: 100%; } .input_icon{ height: 42px; padding:0 28px; } .input_icon a{ position: relative; display: inline-block; height: 20px; width: 24px; margin-top:11px; margin-right:8px; } .input_icon a:nth-child(1){ background: url(//repo.bfw.wiki/bfwrepo/images/chat/icon13.png) no-repeat center center; } .input_icon a:nth-child(1):hover{ background: url(//repo.bfw.wiki/bfwrepo/images/chat/icon13_1.png) no-repeat center center; } .input_icon a:nth-child(2){ background: url(//repo.bfw.wiki/bfwrepo/images/chat/icon14.png) no-repeat center center; } .input_icon a:nth-child(2):hover{ background: url(//repo.bfw.wiki/bfwrepo/images/chat/icon14_1.png) no-repeat center center; } .input_icon a:nth-child(3){ background: url(//repo.bfw.wiki/bfwrepo/images/chat/icon15.png) no-repeat center center; } .input_icon a:nth-child(3):hover{ background: url(//repo.bfw.wiki/bfwrepo/images/chat/icon15_1.png) no-repeat center center; } .input_icon a:nth-child(4){ background: url(//repo.bfw.wiki/bfwrepo/images/chat/icon16.png) no-repeat center center; } .input_icon a:nth-child(4):hover{ background: url(//repo.bfw.wiki/bfwrepo/images/chat/icon16_1.png) no-repeat center center; } .input_icon a:nth-child(6){ background: url(//repo.bfw.wiki/bfwrepo/images/chat/icon17.png) no-repeat center center; float: right; } .input_icon a:nth-child(6):hover{ background: url(//repo.bfw.wiki/bfwrepo/images/chat/icon17_1.png) no-repeat center center; } .input_icon a:nth-child(5){ background: url(//repo.bfw.wiki/bfwrepo/images/chat/icon18.png) no-repeat center center; float: right; } .input_icon a:nth-child(5):hover{ background: url(//repo.bfw.wiki/bfwrepo/images/chat/icon18_1.png) no-repeat center center; } .input_icon a img{ position: absolute; left: 50%; top: 50%; transform:translate(-50%,-50%); } .input_box textarea{ width:calc(100% - 56px); height:calc(100% - 42px); border: none; outline: 0; background:#f5f5f5; resize:none; margin-left: 28px; font-size: 14px; line-height: 20px; } .input_box{ height: calc(100% - 42px); } .office_text1{ width: 100%; height:100%; position: relative; display: inline-block; } #send{ border:1px solid #e5e5e5; background:#f5f5f5; color: #666; padding:0 8px; outline: 0; height: 26px; float: right; margin-top: 8px; margin-right:28px; } #send:hover{ background:#09bb07; color: #fff; border:1px solid #09bb07; } .optionLeft{ background: rgb(158,243,106); float: right; } .windows_body p{ padding: 5px 10px; margin-top: 10px; border-radius:4px; } /*区分聊天*/ .content{ width: 100%; padding:10px 20px; } .me img{ float: right; width: 34px; height: 34px; border-radius: 2px; } .me span { float: right; background: #9eea6a; } .me{ margin-top: 10px; padding-left: 10px; display: block; clear: both; overflow: hidden; float:right; margin-bottom:5px; } .me span{ background: #9eea6a; padding:7px; border-radius:4px; margin:0 10px; max-width:80%; border: 1px solid #9eea6a; position: relative; } .me span:before{ content: " "; position: absolute; top: 9px; right: 100%; border: 6px solid transparent; border-left-color: #9eea6a; right: inherit; left: 100%; } /*other*/ .other img{ float: right; width: 34px; height: 34px; border-radius: 2px; } .other span { float: right; background: #9eea6a; } .other{ margin-top: 10px; padding-left: 10px; width:80%; display: block; clear: both; overflow: hidden; float:left; margin-bottom:5px; } .other img { float: left; } .other span{ background: #fff; padding:7px; border-radius:4px; float: left; margin:0 10px; max-width:80%; border: 1px solid #ededed; position: relative; } .other span:before{ content:""; position: absolute; top: 9px; right: 100%; border: 6px solid transparent; border-right-color: #fff; right: inherit; right: 100%; } </style> </head> <body> <div class="box"> <div class="wechat"> <div class="sidestrip"> <div class="am-dropdown" data-am-dropdown> <!--头像插件--> <div class="own_head am-dropdown-toggle"></div> <div class="am-dropdown-content"> <div class="own_head_top"> <div class="own_head_top_text"> <p class="own_name">彭于晏丶plus<img src="//repo.bfw.wiki/bfwrepo/images/chat/head.png" alt="" /></p> <p class="own_numb">微信号:jsk8787682</p> </div> <img src="images/own_head.jpg" alt="" /> </div> <div class="own_head_bottom"> <p><span>地区</span>江西 九江</p> <div class="own_head_bottom_img"> <a href=""><img src="//repo.bfw.wiki/bfwrepo/images/chat/head_1.png"/></a> <a href=""><img src="//repo.bfw.wiki/bfwrepo/images/chat/head_2.png"/></a> </div> </div> </div> </div> <!--三图标--> <div class="sidestrip_icon"> <a id="si_1" style="background: url(//repo.bfw.wiki/bfwrepo/images/chat/head_2_1.png) no-repeat;"></a> <a id="si_2"></a> <a id="si_3"></a> </div> <!--底部扩展键--> <div id="doc-dropdown-justify-js"> <div class="am-dropdown" id="doc-dropdown-js" style="position: initial;"> <div class="sidestrip_bc am-dropdown-toggle"></div> <ul class="am-dropdown-content" style=""> <li> <a href="#" data-am-modal="{target: '#doc-modal-1', closeViaDimmer: 0, width: 400, height: 225}">意见反馈</a> <div class="am-modal am-modal-no-btn" tabindex="-1" id="doc-modal-1"> <div class="am-modal-dialog"> <div class="am-modal-hd">Modal 标题 <a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>×</a> </div> <div class="am-modal-bd"> Modal 内容。本 Modal 无法通过遮罩层关闭。 </div> </div> </div> </li> <li><a href="#">备份与恢复</a></li> <li><a href="#">设置</a></li> </ul> </div> </div> </div> <!--聊天列表--> <div class="middle on"> <div class="wx_search"> <input type="text" placeholder="搜索"/> <button>+</button> </div> <div class="office_text"> <ul class="user_list"> <li class="user_active"> <div class="user_head"><img src="//repo.bfw.wiki/bfwrepo/image/5e0c6fb85d0a5.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_100,h_100,/quality,q_90"/></div> <div class="user_text"> <p class="user_name">早安无恙</p> <p class="user_message">我是傻逼!,金少凯牛逼!</p> </div> <div class="user_time">下午 2:54</div> </li> <li> <div class="user_head"><img src="//repo.bfw.wiki/bfwrepo/image/5e0c6fb85d0a5.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_100,h_100,/quality,q_90"/></div> <div class="user_text"> <p class="user_name">夏继涛</p> <p class="user_message">[小程序]</p> </div> <div class="user_time">上午 11:03</div> </li> <li> <div class="user_head"><img src="//repo.bfw.wiki/bfwrepo/image/5e0c6fb85d0a5.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_100,h_100,/quality,q_90"/></div> <div class="user_text"> <p class="user_name">十里老街秋名山车神车队</p> <p class="user_message">乞讨两块交个话费</p> </div> <div class="user_time">昨天</div> </li> <li> <div class="user_head"><img src="//repo.bfw.wiki/bfwrepo/image/5e0c6fb85d0a5.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_100,h_100,/quality,q_90"/></div> <div class="user_text"> <p class="user_name">阿杰</p> <p class="user_message">[动画表情]</p> </div> <div class="user_time">昨天</div> </li> <li> <div class="user_head"><img src="//repo.bfw.wiki/bfwrepo/image/5e0c6fb85d0a5.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_100,h_100,/quality,q_90"/></div> <div class="user_text"> <p class="user_name">订阅号</p> <p class="user_message">庐山国际水彩艺术节:</p> </div> <div class="user_time">星期三</div> </li> <li> <div class="user_head"><img src="//repo.bfw.wiki/bfwrepo/image/5e0c6fb85d0a5.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_100,h_100,/quality,q_90"/></div> <div class="user_text"> <p class="user_name">小龙网食品</p> <p class="user_message">槟榔的100种吃法</p> </div> <div class="user_time">星期二</div> </li> <li> <div class="user_head"><img src="//repo.bfw.wiki/bfwrepo/image/5e0c6fb85d0a5.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_100,h_100,/quality,q_90"/></div> <div class="user_text"> <p class="user_name">文件传输助手</p> <p class="user_message"></p> </div> <div class="user_time">星期二</div> </li> <li> <div class="user_head"><img src="//repo.bfw.wiki/bfwrepo/image/5e0c6fb85d0a5.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_100,h_100,/quality,q_90"/></div> <div class="user_text"> <p class="user_name">陈明杰</p> <p class="user_message">妈的,你在聊我</p> </div> <div class="user_time">星期四</div> </li> <li> <div class="user_head"><img src="//repo.bfw.wiki/bfwrepo/image/5e0c6fb85d0a5.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_100,h_100,/quality,q_90"/></div> <div class="user_text"> <p class="user_name">妈</p> <p class="user_message">面</p> </div> <div class="user_time">星期四</div> </li> <li> <div class="user_head"><img src="//repo.bfw.wiki/bfwrepo/image/5e0c6fb85d0a5.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_100,h_100,/quality,q_90"/></div> <div class="user_text"> <p class="user_name">土豆</p> <p class="user_message">[图片]</p> </div> <div class="user_time"></div> </li> <li> <div class="user_head"><img src="//repo.bfw.wiki/bfwrepo/image/5e0c6fb85d0a5.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_100,h_100,/quality,q_90"/></div> <div class="user_text"> <p class="user_name">Emmera</p> <p class="user_message"></p> </div> <div class="user_time"></div> </li> <li> <div class="user_head"><img src="//repo.bfw.wiki/bfwrepo/image/5e0c6fb85d0a5.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_100,h_100,/quality,q_90"/></div> <div class="user_text"> <p class="user_name">彭于晏丶plus</p> <p class="user_message">我送20个都他妈的能赢,这群鬼人真的恐怖</p> </div> <div class="user_time"></div> </li> </ul> </div> </div> <!--好友列表--> <div class="middle"> <div class="wx_search"> <input type="text" placeholder="搜索"/> <button>+</button> </div> <div class="office_text"> <ul class="friends_list"> <li> <p>新的朋友</p> <div class="friends_box"> <div class="user_head"><img src="//repo.bfw.wiki/bfwrepo/image/608412c722be3.png"/></div> <div class="friends_text"> <p class="user_name">新的朋友</p> </div> </div> </li> <li> <p>公众号</p> <div class="friends_box"> <div class="user_head"><img src="//repo.bfw.wiki/bfwrepo/image/60cc69e6d1872.png"/></div> <div class="friends_text"> <p class="user_name">公众号</p> </div> </div> </li> <li> <p>A</p> <div class=".........完整代码请登录后点击上方下载按钮下载查看
网友评论0