Browse Source

update

master
dailer 6 years ago
parent
commit
aa8e0a9adb
  1. 1
      README.md
  2. 30
      dom/侧栏移动到右侧.md
  3. BIN
      screenshorts/3.png

1
README.md

@ -6,3 +6,4 @@
2. [修改平台标题](./dom/修改平台标题.md)
3. [增加一个footer](./dom/增加一个footer.md)
4. [隐藏侧边栏](./dom/隐藏侧边栏.md)
5. [侧栏移动到右侧](./dom/侧栏移动到右侧,md)

30
dom/侧栏移动到右侧.md

@ -0,0 +1,30 @@
# 侧栏移动到右侧
## js
```
// 侧栏移动到右侧
BI.Plugin.registerObject("dec.body", function (widget) {
// 首先去掉主内容区的left值,right值设为70px
widget.element.css({
left: 0,
right: "70px"
});
});
BI.Plugin.registerObject("dec.menu", function (widget) {
// 去掉menu的left值,right值设为0
widget.element.css({
left: "",
right: 0
});
});
BI.Plugin.registerObject("dec.menu.button", function (widget) {
// 最后将menu按钮的激活状态条移动到右边
var line = widget.element.children(".menu-button-line");
line.css({
right: 0,
left: ""
});
});
```
## 效果预览
![](../screenshorts/3.png)

BIN
screenshorts/3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Loading…
Cancel
Save