All Products
Search
Document Center

Set bottom line color

Last Updated: Feb 10, 2021

The interface is used to customize the color of the thin line at the bottom of the navigation bar. You can hide it by setting the line to the same color as the navigation bar.

Usee setBarBottomLineColor interface

 
  1. AlipayJSBridge.call("setBarBottomLineColor", {
  2. color: 16711688
  3. });

Code sample

 
  1. <div style="padding-top:80px;">
  2. <a href="javascript:void(0)" class="btn title">Set the color of the thin line at the bottom of the navigation bar</a><br>
  3. </div>
  4. <script>
  5. function ready(callback) {
  6. // Call directly if JSBridge has been injected
  7. if (window.AlipayJSBridge) {
  8. callback && callback();
  9. } else {
  10. // Monitor the injected events if JSBridge hasn't been injected
  11. document.addEventListener('AlipayJSBridgeReady', callback, false);
  12. }
  13. }
  14. ready(function(){
  15. document.querySelector('.title').addEventListener('click', function() {
  16. AlipayJSBridge.call("setBarBottomLineColor", {
  17. color: parseInt('ff0000', 16)
  18. });
  19. }, false);
  20. },false);
  21. </script>

API

 
  1. AlipayJSBridge.call('setBarBottomLineColor',{
  2. color
  3. }, fn)

Input parameter

Name Type Description Required Default value Version
color int Color value, decimal Y