You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
724 B

5 years ago
# 增加一个footer
## js
```
// 为平台增加一个footer
BI.Plugin.registerObject("dec.app", function (widget) {
// 首先创建一个footer
var footer = $("<div class=\"plugin-footer\">Copyright © 2006-2019 Fanruan. </div>");
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
});
});
```
## 效果预览
![](../screenshorts/2.png)