阅读:3215回复:6
求助,stylish如何让状态栏水平居中显示
用了一个关于add-bar的stylish代码,使状态栏可以只显示合适长度并且鼠标离开后自动隐藏,但这个状态栏的位置貌似只有从左边或右边计算距离,请问怎么修改一下直接让它水平居中?
![]() 代码如下 #browser-bottombox { position: fixed; bottom: 3px; height:auto; width:auto; padding-right: 5px; padding-left: 5px; padding-top: 3px; padding-bottom: 3px; -moz-box-shadow: 0 0 50px #2255ff; background: -moz-Dialog; -moz-transition: bottom .25s ease, opacity 0.25s ease !important; opacity: 0.01; } #browser-bottombox:hover {opacity: 1 !important} #browser-bottombox { left:870PX; -moz-border-radius: 7px; background: -moz-linear-gradient(rgba(126,192,238,.6), rgba(125,158,192,.6) 50%, rgba(112,128,230,.6) 51%, rgba(112,128,230,.6)) !important; } #addon-bar > #status-bar > .statusbar-resizerpanel { position: relative; margin-right:5px; } #addonbar-closebutton {display: none !important;} |
|
1楼#
发布于:2011-03-15 09:50
把870px改成40%。
|
|
2楼#
发布于:2011-03-15 09:50
|
|
3楼#
发布于:2011-03-15 09:50
据我所知只能用left、right、top、bottom定位。
|
|
4楼#
发布于:2011-03-15 09:50
原来如此,谢谢
|
|
5楼#
发布于:2011-03-15 09:50
把870px改成50%
再加一句 margin-left: -x px; x为 add-bar的长度除2 x前面有个 "-" 号 |
|
6楼#
发布于:2011-03-15 09:50
|
|