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
723 B
30 lines
723 B
6 years ago
|
# 侧栏移动到右侧
|
||
|
## 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)
|