切换侧边栏
我和我的小伙伴们都惊呆了!!
此页为于SCP维基内部使用的样版页。
在未经同意的情况下
请不要动这页里面的东西
此组件用于将移动端侧边栏按钮显示于桌面端屏幕上。
添加如下语法以应用此组件:
[[include :scp-wiki:component:toggle-sidebar]]
如果要将其用于某个版式中,推荐将相应版式置于此 [[include]] 下方。
/* source: http://ah-sandbox.wikidot.com/component:collapsible-sidebar-x1 */ #top-bar .open-menu a { position: fixed; top: 0.5em; left: 0.5em; z-index: 5; font-family: 'Nanum Gothic', san-serif; font-size: 30px; font-weight: 700; width: 30px; height: 30px; line-height: 0.9em; text-align: center; border: 0.2em solid #888; background-color: #fff; border-radius: 3em; color: #888; } @media (min-width: 768px) { .mobile-top-bar { display: block; } .mobile-top-bar li { display: none; } #main-content { max-width: 708px; margin: 0 auto; padding: 0; transition: max-width 0.2s ease-in-out; } #side-bar { display: block!important; position: fixed; top: 0; left: -19em; width: 17em; height: 100%; overflow-y: auto; z-index: 10; padding: 0.3em 0.675em; background-color: rgba(0,0,0,0.1); transition: left 0.5s ease-in-out; } #side-bar:target { display: block; left: 0; width: 17em; margin: 0; z-index: 10; } #side-bar:target .close-menu { display: block; position: fixed; width: 100%; height: 100%; top: 0; left: 0; z-index: -1; } #top-bar .open-menu a:hover { text-decoration: none; } .close-menu { margin-left: 19em; opacity: 0; } }
页面版本: 1, 最后编辑于: 05 Mar 2021 06:19