dailer
6 years ago
3 changed files with 32 additions and 1 deletions
@ -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) |
After Width: | Height: | Size: 22 KiB |
Loading…
Reference in new issue