1.若父级用了transform,则子元素用fixed布局会受影响。
(子元素的fiexd布局是相对于父元素的了)。
html,body{
width: 100%;
height: 100%;
}
.parent{
transform: translate(50%,50%);
width: 200px;
height: 200px;
background: #4747ff;
}
.child{
position: fixed;
top: 50%;
left: 20px;
width: 100px;
height: 100px;
background: #ff9272;
}