使用内联CSS将单词添加到编号列表

时间:2019-03-12 09:11:10

标签: css

我正在尝试在编号列表中添加一个单词。我想在数字前加上“ STEP”一词。我已经看到了许多有关如何使用CSS和计数器(如How can I prefix ordered list item numbers with a static string using CSS?)添加它的答案,但是我的列表在生成的电子邮件中。有没有可以内联的方式?

这是我的代码:

public function createForgotPasswordEmail($transcriberEmail, $newpassword) {
    $attachments = $this->setForgotPasswordAttachmentImages();
    $htmlBody = '<h2>Seven steps to reset your password</h2>';
    $htmlBody .= '<span style="background-color: yellow;font-weight: bold;">Please follow the 7 steps below carefully to reset your password.</span><br>';
    $htmlBody .= '<br>This is a <u>one-time use</u> password.  If not used within 72 hours, it will expire and you will need to request another temporary password.<br><br>';
    $htmlBody .= '<ol><li><strong>Log out of the template manager</strong> (right click on the template manager in the task bar and choose Exit from the menu).</li><br />';
    $htmlBody .= '<img src="cid:exit_from_template_manager.png" width="325" height="149"><br /><br />';
    $htmlBody .= '<li>Copy the password below (highlighted in yellow) and use it to sign in to your account on <a href="https://###/">###</a>.';
    $htmlBody .= '<ul><li style="list-style-type: none;padding-top:5px;padding-bottom:5px;">Password: <span style="background-color: yellow;">' . $newpassword . '</span>';
    $htmlBody .= '</li></ul></li>';
    $htmlBody .= '<br /><img src="cid:log_in_to_###.jpg" width="185" height="175"><br /><br />';
    $htmlBody .= '<li>Once you log in, you will be prompted to change your password. ';
    $htmlBody .= 'A message will appear in red at the top left of the ### page if your password was changed successfully.</li>';
    $htmlBody .= '<br /><img src= "cid:password_successfully_changed_message.png" width="190" height="309"><br /><br />';
    $htmlBody .= '<li>You will now be automatically logged out. Please log in again using your new password.</li>';
    $htmlBody .= '<li>Update your password manager with your new password, if you use one.</li>';
    $htmlBody .= '<li>Log in to the template manager using your new password.</li>';
    $htmlBody .= '<br /><img src="cid:login_to_template_manager.png" width="361" height="298"><br /><br />';
    $htmlBody .= '<li>If you use a separate password manager for the template manager, update your password there too.</li></ol>';
    $htmlBody .= '<br><br>Thank you,<br>###';
    $data = [
        'From' => '###',
        'To' => $transcriberEmail,
        'Subject' => 'Your temporary ### password',
        'Tag' => 'temporaryPasswordSent',
        'HtmlBody' => $htmlBody,
        'Attachments' => $attachments
    ];
    $emailClient = new emailClient();
    return $emailClient->sendEmailWithInlineAttachments($data);

}

请清楚一点,我要输出:

STEP 1. Log out of the...
STEP 2. Copy the...

0 个答案:

没有答案