

.lightBox{margin-left:50px;width:750px;position: relative;height: 580px;padding: 10px 0;}
.lightBox ul{width: 650px}
.lightBox li{height: 100px;width: 150px;margin:15px 15px;float: left;overflow: hidden;display: inline;}
.lightBox li img{height: 100px;width: 150px; cursor:pointer;}
.lightBox b{float:left;position: relative;top:117px;right:96px;}
/**弹出层样式***/
.mask{height: 100%;width: 100%;filter:alpha(opacity:0);opacity: 0;background: #000;position: fixed;;z-index: 1;left: 0;top:0;}
.popup{background:#fff url(./images/loading.gif) no-repeat center;border: 10px solid #fff;position: absolute;top:50%;left:50%;z-index: 2;;overflow:hidden;width: 320px;height: 240px}
.popup img{height: auto;width: auto;}
.btn{position: absolute;right: 0;top:0;height: 100%;width: 50%;cursor: pointer;}
.prev{left: 0;background: url(./images/lightbox-btn-prev.gif) no-repeat 0 50px;}
.next{background: url(./images/lightbox-btn-next.gif) no-repeat right 50px;}
.popupBottom{position: relative;z-index: 3;margin-top:8px}
.popupTitle,.popupClose{float: right;}
.popupTitle{width:100%;line-height: 18px;color: #543424;font-family: Arial;font-size: 12px;margin-right: -81px;width: 100%;_margin:-22px 0 0 0}
.popupTitleTxt{float: left;margin-right: 126px}
.popupClose{margin-right:15px;height: 22px;width: 66px;background: url(./images/lightbox-btn-close.gif) no-repeat;cursor: pointer;position: relative;z-index: 4}

我就不明白。如果不按页面向下滚动,在900高度可以正常显示,超过900以上的高度,放大的图片怎么不能跟随了?
`
`
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
你想要的是这种效果吗?https://jsfiddle.net/dwqs/14gxgsjc/
你可以把弹出层改为position:fixed试试
position: fixed;