预测在高负载项目上安装 LESS、CSS3PIE 的后果

发布于 2024-12-07 22:45:40 字数 352 浏览 1 评论 0原文

我面临着全球站点重新设计的情况(不是外观,而是代码架构和底层技术)。网站每天约有135 000 名访问者。现在做出正确的决定至关重要。

我以前没有在这么大的项目上使用LESSCSS3PIE的经验。也许你们中的一些人可以预测我使用上述技术可能会遇到的一些麻烦。我想知道优点和缺点。

使用旧的经过测试且可靠的方法(例如带有阴影和渐变的圆角按钮的精灵)不是更好吗?我查看http://zappos.com。它们只是在 IE 中优雅地降级,并且不使用 CSS3PIE。

I faced situation of global site redesign (not appearance, but code architecture and underlying technologies). Website has about 135 000 visitors everyday. And it's crucial to make right decision now.

I had no experience of using LESS and CSS3PIE on such big projects before. Maybe some of you can predict some trouble which I can run into using technologies mentioned above. I would like to know advantages and drawbacks.

Isn't it better to use old tested and reliable methods like sprites for round corner buttons with shadows and gradients? I look at http://zappos.com. They just degrade gracefully in IE and don't use CSS3PIE.

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

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

发布评论

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

评论(2

少女情怀诗 2024-12-14 22:45:40

没有人回答我,所以我尝试回答自己。由于所有主要平台(Ruby、.NET、PHP)都有服务器端 LESS 编译器,因此我决定使用 LESS 但在服务器端进行编译,而不是使用 LESS.js,这不好,因为它会阻止客户端浏览器缓存 CSS。

至于 CSS3PIE,我没有看到使用它的任何重大缺点,使用 IE 的客户端负载稍多一些,但也不是那么糟糕。

我现在可以预见的唯一问题是背景和装饰在弹出窗口中消失。我已经遇到过这个问题,并在这里发布了一个问题,但没有人回答。

Nobody answered me, so I try to answer myself. Since there are server-side LESS-compilers for all major platforms (Ruby, .NET, PHP) I decided to use LESS but compile server-side instead of using LESS.js which is not good because it prevents client's browser from caching CSS.

As concerning CSS3PIE I don't see any significant drawbacks of using it, a little more load lies on client using IE but it's not so bad.

The only issue I can foresee now is background and decoration disappearing on popups. I have already encountered this problem and posted a question here but no one ever answered.

思慕 2024-12-14 22:45:40

我会避免在生产站点中使用 CSS3Pie。根据我的经验,页面上 CSS3Pie 渲染元素的数量越多,IE8/9 的性能就越差。

具体来说,当我使用 IE9 和 IE8 文档模式,并且至少有 2 个使用 CSS3Pie 渲染的元素(使用边框半径和线性渐变)时,我在滚动浏览器窗口时观察到明显的滞后。也就是说,我会尝试向下滚动页面,滚动条将需要几秒钟才能“赶上”鼠标指针。

当我关闭 CSS3Pie 后,滚动时就没有观察到延迟。根据我的经验,IE8 也是如此。

I would avoid using CSS3Pie for production sites. In my experience, the higher the number of CSS3Pie-rendered elements on the page, the worse IE8/9 will perform.

Specifically, when I was using IE9 with an IE8 document mode, and with at least 2 elements rendered using CSS3Pie (using border-radius and linear-gradient), I observed a noticeable lag when scrolling the browser window. That is, I would try and scroll down the page, and the scroll bar would take a couple of seconds to "catch up" with the mouse pointer.

As soon as I switched CSS3Pie off, no lag when scrolling was observed. The same applies for IE8 in my experience.

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