YUI 2 中有更好的对话框阴影吗?
这里有一个棘手的问题:有人见过 YUI 对话框/面板实现,对话框周围有漂亮的 OS X 风格阴影,而不是默认使用“underlay”元素实现的块状阴影吗?
您可以在 Amazon.com 弹出窗口中看到这种类型的阴影。它需要相当多的 PNG,但看起来非常漂亮。
我正在考虑插入额外的 DIV 或替换 .underlay 元素,并挂钩到对话框大小事件以适应尺寸。后者是必需的,因为 YUI 使用一些 CSS 技巧来使底层元素仅在现代浏览器中使用 CSS“捕捉”到对话框尺寸,并使用 IE 的手动尺寸更新。
编辑:刚刚检查了 YUI 3。面板小部件尚不可用,只有容器,而且仍处于测试阶段。所以我正在考虑在 YUI 2 中解决这个问题。
PS:哦,我想我可以将 PNG 阴影作为面板页眉、正文和页脚(hd、bd、ft)的一部分,作为额外的填充。并使用 css 规则隐藏 YUI 的底层。嗯嗯,我只是希望我不必这样做,因为它改变了可拖动区域的计算,这不是一个好方法。
Here's a tricky one: has anybody seen a YUI dialog/panel implementation with nice OS X style shadows around the dialog, instead of the blocky shadow that is implemented by default with the "underlay" element?
You can see this type of shadow on Amazon.com popup windows. It requires quite a bit of PNGs but looks very nice.
I'm thinking of inserting extra DIVs or replacing the .underlay element, and hook into the dialog size event to adapt the dimensions. The latter would be required because YUI uses some CSS trickery to make the underlay element "snap" to the dialog dimensions with CSS only in modern browsers, and uses a manual dimension update for IE.
EDIT: Just checked YUI 3. The Panel widget is not available yet, only the Container and it's still beta. So I'm looking at solving this in YUI 2.
PS: Oh I guess I could include the PNG shadow as part of the Panel's header, body and footer (hd, bd, ft), as an extra padding. And use a css rule to hide YUI's underlay. Hmmmmmm I just wish I didn't have to do this because it changes calculations for the draggable area, it's not a great way to do it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论