0

我正在使用 RefineSlide 响应式幻灯片,但我无法将其居中,它总是贴在我页面的左侧。

#slideshow{
position: relative;
width: 960px;
height:auto;
left: 50%;
margin-left: -480px;
}

我已经尝试将上述内容添加到我的 CSS 中,尽管这成功地将其居中,但不幸的是它不再响应,因为当我在 iPhone 上测试时,幻灯片不适合屏幕。

#slideshow{
position: relative;
width: 100%;
height:auto;
}

当我这样设计它时,它是响应式的......但坚持向左。我需要用这个 CSS 改变什么以使其居中并保持响应?

4

1 回答 1

0

这在某种程度上取决于您的其他标记,但总的来说这已经足够了:

#slideshow {
    margin: auto;
    width: Npx;
    /* also display: block if the element doesn't already have it */
}

样品

于 2012-09-27T23:16:44.473 回答