CSS 为电子邮件绘制向下箭头(mail.google.com 个问题)

CSS draw down arrow for email (mail.google.com issues)

在我的电子邮件 html 模板中,我需要这个箭头

不提供使用嵌入图像,它必须是 css ...

如本 JSFIDDLE 所示,您可以利用 CSS calc() 来解决这个问题

.div1 {
    min-height:24px;
    background:#bedfd0;
    width: 16px;
    margin-left:calc(50% + 8px);
}
.div2 {
    border:solid transparent;
    min-height:0;
    width:0;
    border-width:26px;
    border-top:31px solid #bedfd0;
    margin-left:calc(50% - 10px);
}
<tr>
    <td>
        <div class="div1"></div>
        <div class="div2"></div>
    </td>
</tr>

不能保证保证金自动在 Google 邮件中工作,但您可以尝试添加一个容器 div

<tr>
    <td>
         <div class="container">
            <div class="top"></div>
            <div class="bottom"></div>
        </div>
    </td>
</tr>

CSS

.container{
    width:48px;
    margin:auto;
}

.top{
    margin-left: 17.5px;
    min-height:24px;
    background:#bedfd0;
    width: 16px;
}

.bottom{                        
    border:solid transparent;  
    border-width:26px;
    border-top:31px solid #bedfd0;
    border-bottom-width: 0;
}

Jsfiddle 在这里更新:http://jsfiddle.net/b0vryojq/6/