CSS浮动中心黑客可能与一点JS
我在将事物保持在中心位置时遇到问题。图片库的项目符号位于绝对导航系统内,主要由宽度为 968px 的容器上的位置:绝对属性控制;
有数量未知的图片。如果有 8 个,则有 8 个子弹、4 个、4 个子弹等...子弹需要浮动以确保它们彼此对齐,但由于它们不是 float:center,所以我无法完成中心位置。
他们是一个很好的干净的 CSS 解决方案吗?或者最好使用一些 JS 来检测子弹的数量,然后相应地定位。
示例 -- http://www.golfbrowser.com/courses/wentworth-east/
任何想法,
太棒了
I have a problem with keeping things in the centre. Bullets for a picture gallery are positioned inside an absolute navigation system primarily controlled by a position:absolute attribute on the container with a width:968px;
There are an unknown number of pictures. If there are 8 there will be 8 bullets, 4, 4 bullets etc... The bullets need to be floated to ensure that they are inline with each other, but since their is no float:center then I cannot accomplish the central position.
Is their a nice clean CSS solution to this or would it be best to use a bit of JS to detect the quantity of bullets and then position accordingly.
Example -- http://www.golfbrowser.com/courses/wentworth-east/
Any ideas,
Marvellous
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请尝试以下操作:
Try the following: