1

当我将它与 MFMailComposeViewController 一起使用时,我的 CSS 格式会丢失。下面是我的示例代码。我只是在正文部分下插入我的表格数据。

<html>
<head>
  <style type="text/css">
    #customers {
      font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
      width: 100%;
      border-collapse: collapse;
    }
    #customers td,
    #customers th {
      font-size: 1em;
      text-align: right;
      border: 1px solid #999999;
      padding: 10px 25px 5px 25px;
    }
    #customers th {
      font-size: 1.1em;
      text-align: center;
      padding: 10px 25px 5px 25px;
      background-color: #ffffff;
      color: #000000;
    }
  </style>

</head>

<body>

  %@

</body>

</html>

我在撰写电子邮件时设置了“isHTML=YES”。我是否遗漏了什么,或者使用 MFMailComposeViewController 在 iphone 上不支持这种使用 CSS 的方法

4

1 回答 1

0

我不清楚,但你是把你的 CSS 放在<body>or里面<head>吗?我认为MFMailComposeViewController需要在<body></body>标签内定义 CSS。

于 2010-11-21T04:24:26.750 回答