我试图在创建css聊天泡泡时使用它,我可以看到一条线穿过我聊天泡泡中的三角形,如下图所示
在chrome浏览器上也没有任何问题,但在旧的xulrunner浏览器上,这给出了一条线。
.talk-bubble {
margin: 40px;
display: inline-block;
position: relative;
width: 200px;
height: auto;
background-color: blue;
}
.triangle.left-top:after {
content: ' ';
position: absolute;
width: 0;
height: 0;
left: -20px;
right: auto;
top: 0px;
bottom: auto;
border: 22px solid;
border-color: blue transparent transparent transparent;
}
.triangle.right-top:before {
content: ' ';
position: absolute;
width: 0;
height: 0;
left: auto;
right: -20px;
top: 0;
bottom: auto;
border: 32px solid;
border-color: blue transparent transparent transparent;
}
<div class="talk-bubble triangle left-top">
<p>Left flush at the top.</p>
</div>
<div class="talk-bubble triangle right-top">
<p>Right flush at the top.</p>
</div>
任何关于哪里出了问题的线索都会很有帮助。