Skip to content

使用 CSS 自定义选择加入提示

使用 CSS 进行高级定制

要自定义您的选择加入提示,甚至超越我们的提示管理工具,您可以轻松地在您的网站上应用自定义 CSS。以下是您可以操纵的主要元素。

  • pushboxcontainer = 主容器
  • noticlose = 关闭图标
  • noticon = 响铃图标(您也可以使用“._aimtellBell” - 请参阅下面的示例 2)
  • notibody = 正文(主标题和署名)
  • teaser = 主标题
  • teaser-byline = 署名
  • button-approve = 批准按钮
  • button-deny = 拒绝按钮

示例 1:更改字体大小

例如,您可以通过将以下代码片段添加到您的网站来更改署名文本的字体大小:

txt
<style> pushbox teaser-byline{ font-size:17px } </style>

为了避免与其他 CSS 属性发生冲突,我们建议您在应用样式时尽可能细化。为了您的方便,下面是一个脚本示例:

txt
<pushboxcontainer>
  <pushbox>
    <pushbox-cta>
      <noticlose onclick="_aimtellPromptCancel()">X</noticlose>
      <noticon>
        <a target="_BLANK" rel="nofollow">
          <img width="25" class="_aimtellBell" src="/images/noticon.png">
        </a>
      </noticon>
      <notibody>
        <teaser></teaser>
        <teaser-byline>Would you like to receive notifications about XYZ?</teaser-byline>
      </notibody>
      <buttons>
        <button-approve onclick="_aimtellPromptApprove()" class="_aimtellPromptApprove">Of course</button-approve>
        <button-deny onclick="_aimtellPromptDeny()" class="_aimtellPromptDeny">No, thanks.</button-deny>
      </buttons>
    </pushbox-cta>
  </pushbox>
</pushboxcontainer>

示例 2:更改响铃图标

如果您想更改用于通知铃声的图标,可以使用以下代码。只需将 URL 替换为您的图标的 URL,并将其粘贴到您的网站上 </body> 结束标记之前即可。

txt
<style> _aimtellBell{ content:url('/images/icon-192x192.png') !important; } </style>

如果您有任何其他问题,请通过 support@aimtell.com 联系我们