Mar*_*jus 10 javascript iframe braintree
我正在使用braintree dropin UI:
<div id="braintree-dropin"></div>
Run Code Online (Sandbox Code Playgroud)
var braintree_client_token = "{{ braintree_client_token }}";
function braintreeSetup() {
// Here you tell Braintree to add the drop-in to your division above
braintree.setup(braintree_client_token, "dropin", {
container: "braintree-dropin"
, onError: function (obj) {
// Errors will be added to the html code
$('[type=submit]').prop('disabled', false);
$('.braintree-notifications').html('<p class="alert alert-danger">' + obj.message + '</p>');
}
});
}
braintreeSetup();
Run Code Online (Sandbox Code Playgroud)
并且生成的dropin有很多不必要的高度:
我该如何调试此程序以及可能导致这种情况的原因?我已经在生产环境和生活环境中进行了测试,但同样的问题仍然存在。
编辑:
您可以在此处找到并检查:http : //floarplans.com/order/
这是因为你的 theme.css 第 2480 行有以下规则:
iframe {
width: 100%;
min-height: 350px;
border: none;
}
Run Code Online (Sandbox Code Playgroud)
如果您在 head 标签末尾包含以下 css。
<head>
<!-- Lots of meta and link tags. -->
<style>
iframe#braintree-dropin-frame {
min-height: initial;
}
</style>
</head>
Run Code Online (Sandbox Code Playgroud)
这应该将其重置回正常状态。因为在CSS中,最新的和更具体的规则会覆盖其他规则。
| 归档时间: |
|
| 查看次数: |
117 次 |
| 最近记录: |