1

我正在构建一个表单来通过 Recurly 处理付款。non-recurly.js 字段使用 Bootstrap 进行布局。

我可以设置包含 DIV 的样式以获取边框和边框半径以匹配 Bootstrap 字段,但 Bootstrap 在输入字段上设置填充:

padding: 6px 12px;

...我相信您通过递归配置传递了实际输入字段的样式,所以我尝试了这个:

style: {
        all: {
            fontFamily: 'Verdana',
            fontSize: '14px',
            fontWeight: 'normal',
            padding: '8px'
        },
        number: {
            placeholder: 'Credit card number'
        },
        month: {
            placeholder: 'Exp. Month (mm)'
        },
        year: {
            placeholder: 'Exp. Year (yy)'
        }
    }

...但它只是忽略了填充。某处是否有 Recurly.js 的“支持”样式选项列表?任何人都想出如何在 iFramed/injected 输入字段上进行填充?

4

1 回答 1

2

Recurly 有几个可以设置样式的 css 类。我发现这比尝试使用他们的 js 样式要容易得多。

所以我使用 css 为这些类设置样式并忽略所有 js 选项。

.recurly-hosted-field        = Default styles for the div surrounding each field iframe.
.recurly-hosted-field-focus  = Applied when the user focuses on a field.
.recurly-hosted-field-number = Default styles for the div surrounding the month field iframe.
.recurly-hosted-field-month  = Default styles for the div surrounding the month field iframe.
.recurly-hosted-field-year   = Default styles for the div surrounding the year field iframe

文档:https ://dev.recurly.com/docs/getting-started-1 他们在此链接底部有一个表格,其中包含这些类

于 2016-08-09T22:59:59.660 回答