使用css实现QQ聊天气泡效果
来源:互联网 发布:人过五十知天命感慨 编辑:程序博客网 时间:2024/04/20 19:17
这是效果图~
html代码:
<div class="bubbleDiv"> <div class="bubbleItem"> <!--左侧的泡泡--> <span class="bubble leftBubble"> 老师,你好! <span class="bottomLevel"></span> <span class="topLevel"></span> </span> </div> <div class="bubbleItem clearfix"> <span style="font-family: Arial, Helvetica, sans-serif;"><!--右侧的泡泡--></span> <span class="bubble rightBubble"> 老师,你好! <span class="bottomLevel"></span> <span class="topLevel"></span> </span> </div> <div class="bubbleItem"> <span class="bubble leftBubble"> 老师,你好! <span class="bottomLevel"></span> <span class="topLevel"></span> </span> </div> <div class="bubbleItem"> <span class="bubble leftBubble"> 老师,你好! <span class="bottomLevel"></span> <span class="topLevel"></span> </span> </div> </div>
css代码:
.bubbleDiv{ width: 1000px; margin: 0 auto; height: 1000px; border: 1px solid #4a4f58; } .bubbleItem{ width: 100%; } .bubble{ max-width: 655px; position: relative; line-height: 30px; padding-left: 10px; padding-top: 3px; padding-bottom: 3px; border-radius: 7px; margin-top: 15px; padding-right: 10px; display: inline-block; } .leftBubble{ position: relative; margin-left: 25px; border: 1px solid #00b6b6; background-color: #f8fdfc; } .leftBubble .bottomLevel{ position: absolute; top: 10px; left: -10px; border-top: 10px solid #00b6b6; border-left: 10px solid transparent; } .leftBubble .topLevel{ position: absolute; top: 11px; left: -8px; border-top: 10px solid #f8fdfc; border-left: 10px solid transparent; z-index: 100; } .rightBubble{ position: relative; margin-right: 25px; float: right; border: 1px solid #aaa; } .rightBubble .bottomLevel{ position: absolute; bottom: 11px; right: -10px; border-bottom: 10px solid #aaa; border-right: 10px solid transparent; } .rightBubble .topLevel{ position: absolute; bottom: 12px; right: -8px; border-bottom: 10px solid #fff; border-right: 10px solid transparent; z-index: 100; } .clearfix:after { visibility: hidden; display: block; font-size: 0; content: " "; clear: both; height: 0; }
0 0
- 使用css实现QQ聊天气泡效果
- 实现QQ聊天气泡效果
- 【HTML5】实现QQ聊天气泡效果
- 【HTML5】简单实现QQ聊天气泡效果
- QQ聊天气泡拖动效果实现
- 纯CSS实现聊天框小尖角、气泡效果
- 纯CSS实现聊天框小尖角、气泡效果
- 聊天气泡效果实现
- 用border-image实现QQ气泡聊天窗效果
- 仿微信聊天气泡效果实现
- 仿微信聊天气泡效果实现
- 仿微信聊天气泡效果实现
- 网页聊天气泡效果实现
- 类似QQ的聊天气泡效果
- 利用css实现聊天气泡
- Android之QQ聊天气泡对话实现
- QQ聊天界面——QQ气泡效果与ListView
- QQ聊天界面——QQ气泡效果与ListView
- 旁路电容和去偶电容Bypass and Decouple
- 往企业家蜕变的过程中该如何拥抱失败 6 - 创意反嚼
- Git常用命令和操作(二)
- 使用JSoup解析HTML文件
- android开发之分享App模块
- 使用css实现QQ聊天气泡效果
- WPF制作时钟,依赖属性使用,有个奇怪的地方自己没理解
- 六祖伐竹
- 关于在MFC中实用在基于对话框窗口上面绘制折线的实现方法
- 在人间已是颠,何苦还要上青天
- 变参转换
- URAL 1711. Code Names (数学啊 )
- spring 事务管理详解 学习心得
- jsp 里面map循环使用key/value