jCarousel - 帮助新皮肤

发布于 2024-07-07 21:58:38 字数 486 浏览 7 评论 0原文

我正在为 jCarousel 组件创建一个新主题 用于我的网站,该组件的尺寸为: 宽度:485px,高度:161px 包括两个箭头,我想要的是 每个周期有 3 个项目,每个项目的尺寸为 140X100 (宽度 X 高度),边距为 5 像素,3/4 的皮肤已完成,但我 CSS 遇到困难。

PS:请访问此页面查看组件实时情况 http://www.amfexglobal.com/test/static_auto.html 如果您对从这里下载的文件感兴趣 http://www.mediafire.com/?ejlmmxxzdid

非常感谢。

I'm creating a new theme for the jCarousel component that I'll be
using for my web site and the dimension for this component will be:
width:485px , height:161px including the two arrows and what i want is
to have 3 items per cycle each having the a dimension of 140X100
(width X height) with 5px margin, and 3/4 of the skin is done but I'm
having a hard time with css.

P.S: Please visit this page to see the component live
http://www.amfexglobal.com/test/static_auto.html
and if you are interested in the files download from here
http://www.mediafire.com/?ejlmmxxzdid

Thanks so much in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

↘紸啶 2024-07-14 21:58:38

也许解释一下您遇到的问题?

在我看来(从你的样本来看),你没问题,除了第一个和最后一个元素的边距过高或过低,具体取决于它们落在哪里。

您可以通过两种方式来解决这个问题:

  • 分割您的边距,以便您使用 0px 3px 0px 2px 而不是边距:0 5px 0 0。 不过,如果数字是奇数,那就有点不平衡。

  • 我认为更好的方法是将包含元素的内边距设置为 padding-left: 5px。 这会给你一个 5px 的“领先优势”,然后每个元素的右边距都会处理最后一个元素。

祝你好运!

Perhaps explain the problem you're having?

The way I see it (from looking at your sample), you're all right except the first and last elements are either over- or under- margined, depending on where they fall.

You can fight this two ways:

  • Split up your margin, so that instead of margin: 0 5px 0 0 you're using 0px 3px 0px 2px. With an odd number, though, that's a tiny bit unbalanced.

  • Better, I think is to set padding on your containing element to padding-left: 5px. That gives you a 5px "head-start", and then the right margin on each of your elements takes care of the last.

Good luck!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文