如何为 branch.io 中的 android 定制智能应用横幅?
How to customize smart app banner for android in branch.io?
我使用wordpress中branch metrics提供的代码创建了一个智能横幅,但是我无法改变横幅的颜色、高度和位置。我还需要横幅上的箭头!! wordpress 中是否有用于此目的的插件!
来自 Branch.io 的 Alex:我们目前没有用于智能横幅的 WordPress 插件,但这是个好主意!
与此同时,我们有一些 customization options you can use, and you can also apply your own custom CSS styles 的横幅。
编辑
简单地调整横幅的高度有点困难,您必须自己去感受一下,但是您可以使用这段代码作为起点(例如将高度从 76px 增加到 90px ):
<style>
#branch-banner-iframe {
height: 90px !important;
}
</style>
<script type="text/javascript">
(function(b,r,a,n,c,h,_,s,d,k){if(!b[n]||!b[n]._q){for(;s<_.length;)c(h,_[s++]);d=r.createElement(a);d.async=1;d.src="https://cdn.branch.io/branch-latest.min.js";k=r.getElementsByTagName(a)[0];k.parentNode.insertBefore(d,k);b[n]=h}})(window,document,"script","branch",function(b,r){b[r]=function(){b._q.push([r,arguments])}},{_q:[],_v:1},"addListener applyCode banner closeBanner creditHistory credits data deepview deepviewCta first getCode init link logout redeem referrals removeListener sendSMS setIdentity track validateCode".split(" "), 0);
branch.init('key_live_xxxxxxxxxxxxxxxxxxxxx');
branch.banner({
icon: 'http://icons.iconarchive.com/icons/wineass/ios7-redesign/512/Appstore-icon.png',
title: 'Branch Demo App',
description: 'The Branch demo app!',
customCSS: '.content { height: 90px !important; } .right { height: 77px !important; padding-top: 29px !important; } .left { height: 77px !important; } #branch-banner-close { top: 21px; } #branch-banner .icon img { margin-top: 7px; }'
}, {});
</script>
我使用wordpress中branch metrics提供的代码创建了一个智能横幅,但是我无法改变横幅的颜色、高度和位置。我还需要横幅上的箭头!! wordpress 中是否有用于此目的的插件!
来自 Branch.io 的 Alex:我们目前没有用于智能横幅的 WordPress 插件,但这是个好主意!
与此同时,我们有一些 customization options you can use, and you can also apply your own custom CSS styles 的横幅。
编辑
简单地调整横幅的高度有点困难,您必须自己去感受一下,但是您可以使用这段代码作为起点(例如将高度从 76px 增加到 90px ):
<style>
#branch-banner-iframe {
height: 90px !important;
}
</style>
<script type="text/javascript">
(function(b,r,a,n,c,h,_,s,d,k){if(!b[n]||!b[n]._q){for(;s<_.length;)c(h,_[s++]);d=r.createElement(a);d.async=1;d.src="https://cdn.branch.io/branch-latest.min.js";k=r.getElementsByTagName(a)[0];k.parentNode.insertBefore(d,k);b[n]=h}})(window,document,"script","branch",function(b,r){b[r]=function(){b._q.push([r,arguments])}},{_q:[],_v:1},"addListener applyCode banner closeBanner creditHistory credits data deepview deepviewCta first getCode init link logout redeem referrals removeListener sendSMS setIdentity track validateCode".split(" "), 0);
branch.init('key_live_xxxxxxxxxxxxxxxxxxxxx');
branch.banner({
icon: 'http://icons.iconarchive.com/icons/wineass/ios7-redesign/512/Appstore-icon.png',
title: 'Branch Demo App',
description: 'The Branch demo app!',
customCSS: '.content { height: 90px !important; } .right { height: 77px !important; padding-top: 29px !important; } .left { height: 77px !important; } #branch-banner-close { top: 21px; } #branch-banner .icon img { margin-top: 7px; }'
}, {});
</script>