我试图创建一个看起来类似于消息(线程视图)的 html 页面,就像在我们的 android 和 iphone 设备中一样。
这是我编码的内容
CSS样式:
<style type='text/css'>
.triangle-right
{
position:relative;
padding:15px;
color:#fff;
background:#075698;
background:-webkit-gradient(linear, 0 0, 0 100%, from(#2e88c4), to(#075698)); background:-moz-linear-gradient(#2e88c4, #075698);
background:-o-linear-gradient(#2e88c4, #075698);
background:linear-gradient(#2e88c4, #075698);
-webkit-border-radius:10px;
-moz-border-radius:10px;
border-radius:10px;
}
.triangle-right.top
{
background:-webkit-gradient(linear, 0 0, 0 100%, from(#075698), to(#2e88c4));
background:-moz-linear-gradient(#075698, #2e88c4);
background:-o-linear-gradient(#075698, #2e88c4);
background:linear-gradient(#075698, #2e88c4);
}
.triangle-right.left
{
margin-left:10px;background:#075698;
}
.triangle-right.right
{
margin-right:10px; background:#075698;
}
.triangle-right:after
{
content:'';
position:absolute;
bottom:-20px;left:50px;border-width:20px 0 0 20px;border-style:solid;border-color:#075698 transparent; display:block;width:0;
}
.triangle-right.top:after
{
top:-20px;right:50px;bottom:auto;left:auto;border-width:20px 20px 0 0;border-color:transparent #075698;
}
.triangle-right.left:after
{
top:16px;left:-15px; bottom:auto;border-width:0 15px 15px 0;border-color:transparent #E8E177;
}
.triangle-right.right:after
{
top:16px;right:-15px;bottom:auto;left:auto;border-width:0 0 15px 15px; border-color:transparent #8EC3E2 ;
}
.triangle
{
width: 0;
height: 0;
border-left: 50px solid transparent;
border-right: 100px solid transparent;
border-bottom: 50px solid #fc2e5a;
}
我尝试更改一些值
.triangle-right.left:after
{
top:16px;left:-15px; bottom:auto;border-width:0 15px 15px 0;border-color:transparent #E8E177;
}
.triangle-right.right:after
{
top:16px;right:-15px;bottom:auto;left:auto;border-width:0 0 15px 15px; border-color:transparent #8EC3E2 ;
}
但没有得到所需的确切形状。我需要按以下方式构建气泡
谁能帮我