我如何可以显示电子邮件teamplate的背景图像Laravel

5us2dqdw  于 2023-06-25  发布在  其他
关注(0)|答案(1)|浏览(124)

我想把background-image显示为邮件模板的背景,怎么做?

cuxqih21

cuxqih211#

这只是基本的HTML/CSS的东西。与Laravel无关
例如:

<body style="background: url('{{ asset('images/your-image.jpg') }}')">

更多有用的CSS

no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover;

阅读更多-> HTML Background Images

<!DOCTYPE html>
<html>
<head>
    <title>Email Template</title>
</head>
<body>
    <table width="100%" height="100%" style="background: url('https://www.yourwebsite.com/path-to-your-image.jpg') no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover;">
        <tr>
            <td>
                <h1>Hello, World!</h1>
                <p>This is a simple email template with a background image.</p>
            </td>
        </tr>
    </table>
</body>
</html>

相关问题