我正在使用外部宽度为 100% 的图片库。但是图像将左对齐,因为图库图像位置是绝对的。我正在尝试使中心对齐,请帮助我。
外部 div css 代码:
.wt-rotator .screen {
height: 500px !important;
left: -5px;
position: relative;
top: -11px;
width: 100% !important;
}
图像 css 上的样式:
.wt-rotator .main-img {
border: 0 none;
display: none;
left: 0;
padding: 0 !important;
position: absolute;
top: 0;
z-index: 0;
}
谢谢。