我想把background-image显示为邮件模板的背景,怎么做?
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>
1条答案
按热度按时间cuxqih211#
这只是基本的HTML/CSS的东西。与Laravel无关
例如:
更多有用的CSS
阅读更多-> HTML Background Images