CSS子元素设置绝对定位后改变窗口大小位移的解决办法

给父元素添加相对定位

#cls {
    position: relative;
    width: 100%;
    text-align: center;
    min-width: 810px;
    height: 100%;
    min-height: 600px;
}

猜你喜欢

转载自www.cnblogs.com/codeninja/p/12170461.html