Add: 屏幕宽度小于 960px 时,隐藏左侧
This commit is contained in:
parent
d9ee2d6d41
commit
0c8ac5f2ed
|
@ -1,5 +1,5 @@
|
|||
left-side-width = 30%
|
||||
right-side-width = 70%
|
||||
$left-side-width = 30%
|
||||
$right-side-width = 70%
|
||||
|
||||
.page-container {
|
||||
position absolute
|
||||
|
@ -11,15 +11,26 @@ right-side-width = 70%
|
|||
|
||||
.page-left {
|
||||
float: left
|
||||
width: left-side-width
|
||||
width: $left-side-width
|
||||
height: 100%
|
||||
position: fixed
|
||||
}
|
||||
|
||||
.page-right {
|
||||
float: right
|
||||
width: right-side-width
|
||||
width: $right-side-width
|
||||
height: 100%
|
||||
}
|
||||
|
||||
@media screen and (max-width: 960px) {
|
||||
.page-left {
|
||||
display none
|
||||
}
|
||||
|
||||
.page-right {
|
||||
width: 100%
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1 @@
|
|||
console.log('this is main.js');
|
||||
(() => {
|
||||
// 选择分页器元素里面的 a 标签,但不包含 .page-number,给指定元素追加类 btn 和 设置属性 role=navigation
|
||||
document.querySelectorAll('.home-container .paginator a:not(.page-number)').forEach(e => {
|
||||
e.classList.add('btn');
|
||||
e.setAttribute('role', 'navigation');
|
||||
});
|
||||
})();
|
|
@ -1,4 +0,0 @@
|
|||
export const addClass = (element, className) => {
|
||||
element.classList.add(className)
|
||||
};
|
||||
|
Loading…
Reference in New Issue