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

标签 html css email gmail

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

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

最佳答案

不能保证 margin auto 会在 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/

关于html - CSS 为电子邮件绘制向下箭头(mail.google.com 问题),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33335216/

相关文章:

html - 文章中看不到嵌入式YouTube iframe

html - CSS 外部样式表不起作用,但完全相同的 CSS 在内部样式表上起作用

html - 文本 nowrap 和 max-width 100%

css - SCSS 根据另一个元素动态分配边距

javascript - Nodemailer SMTP 服务器接收电子邮件但不响应任何内容

php - 使用 Mail() 类发送的电子邮件显示 HTML 代码而不是结果

php - 如何将 php 发送邮件表单与图像点击列表结合起来?

javascript - 使用 getElelementsByClass 翻转多张卡片

html - 在 HTML 中应该先出现什么, anchor 还是标题?

css - Firefox/IE CSS 问题 - 图像未按百分比缩放