css3 对话样式

 

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Security-Policy">

<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<title></title>
<style>
.tip{
border-color: #ddd;
background-color: #fff;
color: #444;
position: relative;
z-index: 2;
display: block;
margin: 0px;
padding: 5px 10px;
border-width: 1px;
border-style: solid;
font-size: 16px
}
.img-right{
padding-top: 8px;
padding-right: 106px;
min-height: 100px;
border: none
}
.img-right>img:first-child {
position: absolute;
top: 10px;
right: 10px;
max-width: 80px;
max-height: 80px;
width: 100%;
height: 100%;
}

.img-left{
padding-top: 8px;
padding-left: 106px;
min-height: 100px;
border: none
}
.img-left>img:first-child {
position: absolute;
top: 10px;
left: 10px;
max-width: 80px;
max-height: 80px;
width: 100%;
height: 100%;
}

.dialogue-left{
margin-top:3px;padding: 5px;background: #eee;border-radius: 3px;min-height: 80px
}
.dialogue-left span:before{
content: ' ';
display: inline-block;
position: absolute;
right: 93px;
top: 20px;
width: 0;
height: 0;
border-width: 7px;
border-style: solid;
border-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0) #e5e5e5 #e5e5e5;
}

.dialogue-right{
margin-top:3px;padding: 5px;background: #eee;border-radius: 3px;min-height: 80px
}
.dialogue-right span:before{
content: ' ';
display: inline-block;
position: absolute;
left: 93px;
top: 20px;
width: 0;
height: 0;
border-width: 7px;
border-style: solid;
border-color: rgba(0, 0, 0, 0) #e5e5e5 #e5e5e5 rgba(0, 0, 0, 0);
}
</style>
<body>
<div class="tip img-right">
<img src="1.jpg"/>
<p class="dialogue-left">
<span>
每天帅一点,这tm还怎么活
</span>
</p>
</div>

<div class="tip img-left">
<img src="2.jpg"/>
<p class="dialogue-right">
<span>
每天都在帅,却依然那么丑
</span>
</p>
</div>
</body>
</html>

转载于:https://www.cnblogs.com/a-long/p/6014843.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值