# 侧栏移动到右侧 ## 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)