# 增加一个footer ## js ``` // 为平台增加一个footer BI.Plugin.registerObject("dec.app", function (widget) { // 首先创建一个footer var footer = $("
"); footer.css({ position: "absolute", bottom: 0, left: 0, right: 0, height: 30, backgroundColor: "#2C3D59", color: "white", textAlign: "center" }); // 添加到页面中 widget.element.append(footer); // 将主内容区的bottom值设为30 var mainContent = widget.element.children().eq(0); mainContent.css({ bottom: 30 }); }); ``` ## 效果预览 