web/assets/css/less/sidebar/sidebar-fixed.less

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

.sidebar.sidebar-fixed {
	position: fixed;
	top: auto;
	float: none !important;
	
	z-index: @zindex-sidebar-fixed;//???!
	
	&:before {
		height: 5000px;
		top: auto;
		bottom: auto;
	}
}

 //android's default browser has a problem with "top: auto" when fixed
 body.mob-safari {
	 .sidebar.sidebar-fixed {
		top: @navbar-min-height;
	 }
	 @media (max-width: @screen-topbar-down) {
		.navbar-fixed-top:not(.navbar-collapse) + .main-container .sidebar-fixed {
			top: (@navbar-min-height * 2);
		}
	 }
	 //also when .navbar is fixed, .responsive sidebar becomes automatically fixed
	 @media (max-width: @grid-float-breakpoint-max) {
		.navbar-fixed-top + .main-container .sidebar.responsive {
			top: @navbar-min-height;
		}
	 }
	 @media (max-width: @screen-topbar-down) {
		.navbar-fixed-top + .main-container .sidebar.responsive {
			top: (@navbar-min-height * 2);
		}
	 }
 }

/**
//http://updates.html5rocks.com/2012/09/Stacking-Changes-Coming-to-position-fixed-elements
//webkit & Chrome22+ special case
//webkit is not following the standard specs as of Chrome22+
@media screen and (-webkit-min-device-pixel-ratio:0) {
	//like it happens in Firefox&IE, we expect when we set "z-index:auto" for fixed position .sidebar,
	//the child .submenu elements "z-index" is independent
	//and for example a "z-index:1031" .submenu appears on top of a fixed .navbar with "z-index:1030"
	//and a "z-index:1010" .popover appears on top of ".sidebar" but below ".submenu"
	//but webkit defines a new stacking context on "fixed" position elements(.sidebar here)
	//and the above doesn't happen, in fact .submenu inside fixed .sidebar with "z-index:auto" will appear below everything
	//so we set a good(?) "z-index" for .sidebar, but still it's not as good as standard specs (such as in Firefox)
	//and we may need other workarounds!
	//and you may change it based on your needs

	//it's possible have standard functionality in Chrome by going to:
	//chrome://flags/#fixed-position-creates-stacking-context
	//changing "Fixed position elements create stacking contexts" to "Disabled"
	//and removing the following rules
	//and assignning a higher "@submenu-zindex"

	.sidebar.sidebar-fixed {
		z-index: @zindex-sidebar-fixed;//???!
后面还有 67 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。