layui布局实现聊天即时通讯窗口效果代码
代码语言:html
所属分类:布局界面
代码描述:layui布局实现聊天即时通讯窗口效果代码
下面为部分代码预览,完整代码请点击下载或在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" /> <title>BFW NEW PAGE</title> <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/layui.2.8.9.css"> <style> .layui-panel { height: 500px; border: 1px solid #ccc; border-radius: 5px; overflow: auto; } .layui-chat-title { padding: 10px; border-bottom: 1px solid #ccc; } .layui-chat-user{ padding: 10px; } .layui-chat-user img { width: 40px; height: 40px; border-radius: 50%; vertical-align: middle; margin-right: 10px; } .layui-chat-user span { } .layui-chat-title img { width: 40px; height: 40px; border-radius: 50%; vertical-align: middle; margin-right: 10px; } .layui-chat-title span { font-weight: bold; } .layui-chat-main { padding: 10px; height: 300px; overflow-y: scroll; } .layui-chat-mine, .layui-chat-other { margin-bottom: 10px; } .layui-chat-mine img, .layui-chat-other img{ vertical-align: top; } .layui-chat-user { align-items: center; } .layui-chat-user img { width: 30px; height: 30px; border-radius: 50%; margin-right: 10px; } .layui-chat-text { background-color: #f2f2f2; padding: 5px 10px; border-radius: 5px; display: inline-block; max-width: 70%; } .layui-chat-other .layui-chat-text { background-color: #009688; color: #fff; } .layui-chat-bottom { padding: 10px; border-top: 1px solid #ccc; } .layui-chat-tool { margin-bottom: 10px; } .layui-chat-tool i { font-size: 20px; margin-right: 10px; cursor: pointer; } .layui-chat-footer { display: flex; align-items: center; } .layui-chat-footer .layui-input { flex: 1; margin-right: 10px; } #sayword{ height:60px; resize: none; } .chat-user{ cursor: pointer; } .chat-user:hover{ background: #424040; } </style> </head> <body> <div style="max-width:800px;margin:10px auto;"> <div class="layui-row layui-col-space10"> <div class="layui-col-md3"> <div class="layui-panel" style="background:#2f363c; overflow-y: scroll; overflow-x: hidden;"> <ul class="layui-nav layui-nav-tree" lay-filter="test"> <li class="layui-nav-item layui-nav-itemed" style="display:flex;"> <a href="javascript:;">聊天</a> <i class="layui-icon layui-icon-add-circle" style="margin-left:80px;margin-top:4px;"></i> </li> <li class="layui-nav-item chat-user"> <div class="layui-chat-user"> <img src="//repo.bfw.wiki/bfwrepo/image/64c4a32a55d4b.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_100,h_100,/quality,q_90" alt=""> <span>早安无惧</span> </div> </li> <li class="layui-nav-item"> <div class="layui-chat-user chat-user"> <img src="//repo.bfw.wiki/bfwrepo/image/64c4a32a55d4b.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_100,h_100,/quality,q_90" alt=""> <span>早安无惧</span> </div> </li> </ul> </div> </div> <div class="layui-col-md9"> <div class="layui-panel"> <div class="layui-chat-title"> <img src="//repo.bfw.wiki/bfwrepo/image/64c4a32a55d4b.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_100,h_100,/quality,q_90" alt=""> <span>早安无惧</span> </div> .........完整代码请登录后点击上方下载按钮下载查看
网友评论0