clzh
小狐狸
小狐狸
  • UID29072
  • 注册日期2009-06-06
  • 最后登录2013-12-30
  • 发帖数11
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
阅读:1414回复:2

能不能实现书签栏自动隐藏和悬停显示?

楼主#
更多 发布于:2010-11-26 17:39
alanfly修改的这个书签栏自动隐藏的脚本虽然不错,但是和最理想的状态还有点距离,这个脚本只要光标移到导航栏或者进行一般的导航栏操作,也会触发弹出书签栏造成不便。那么能不能实现只有光标悬停在书签栏位置时才出现书签栏呢?
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
@-moz-document url(chrome://browser/content/browser.xul) {

#main-window:not([inFullscreen="true"]) #navigator-toolbox:not([customizing="true"]) ~ #browser {
  margin-top: -32px !important;/* 適宜調整 */
}

#main-window:not([inFullscreen="true"]) #navigator-toolbox:not([customizing="true"]) > #PersonalToolbar {
  -moz-transition: max-height .2s ease-in-out 1s !important;/* 消えるときのアニメーション */
  -moz-box-ordinal-group: 1000 !important;
  padding: 0 3px !important;
  position: relative !important;
  z-index: 100 !important;
  overflow-y: hidden !important;
  max-height: 0px !important;
  min-height: 0px !important;
}

/*
#main-window[stylish-url="about:blank"] #navigator-toolbox:not([customizing="true"]) > #PersonalToolbar,*/
#main-window:not([inFullscreen="true"]) #nav-bar:not([customizing="true"]):hover ~ #PersonalToolbar,#main-window:not([inFullscreen="true"]) #navigator-toolbox:not([customizing="true"])>#PersonalToolbar:hover {
  -moz-transition: max-height .2s ease-in-out !important;/* 表示されるときのアニメーション */
  max-height: 30px !important;
}

}
clzh
小狐狸
小狐狸
  • UID29072
  • 注册日期2009-06-06
  • 最后登录2013-12-30
  • 发帖数11
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
1楼#
发布于:2010-11-26 17:39
特别是在标签栏置顶的情况下
xxp2277
千年狐狸
千年狐狸
  • UID24388
  • 注册日期2008-05-31
  • 最后登录2024-05-18
  • 发帖数1513
  • 经验133枚
  • 威望0点
  • 贡献值46点
  • 好评度8点
  • 社区居民
2楼#
发布于:2010-11-26 17:39
-moz-transition: max-height .2s ease-in-out !important;/* 表示されるときのアニメーション */

参照上面的代码改为:
-moz-transition: max-height .2s ease-in-out .1s !important;/* 表示されるときのアニメーション */

0.1s的超时。我试了一下,没有问题。
游客

返回顶部