|
.header {
position: relative;
height: 44px;
background-color: #06091C;
color: #fff;
}
.header .left {
position: absolute;
width: 44px;
height: 44px;
left: 0;
bottom: 0;
background-image: url('../../image/strategy/back.png');
background-repeat: no-repeat;
background-size: 20px 20px;
background-position: 8px center;
}
.header .center {
position: absolute;
width: 60%;
height: 44px;
left: 20%;
bottom: 0;
font-size: 20px;
}
.header .right {
position: absolute;
height: 44px;
right: 0;
bottom: 0;
font-size: 14px;
padding: 0 12px;
}
<header class="header">
<div class="left" tapmode onclick="fnCloseWin()"></div>
<div class="center v2-flex-center">
发微博
</div>
<div class="right v2-flex-center-v display-none" tapmode onclick="fnClickRight()">
发布
</div>
</header>
apiready = function() {
fixStatusBar();
}
//修复沉浸式头部高度
function fixStatusBar() {
var el = document.querySelector('header');
if (!el) {
return;
}
el.style.paddingTop = api.safeArea.top + 'px';
window.headerHeight = el.offsetHeight; // 获取header高度
}
|
|