我应该包括“无前缀”插件在我的网站 [英] Should I include "prefix-free" plugin in my website

查看:108
本文介绍了我应该包括“无前缀”插件在我的网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无前缀是Lea Verou的一个很酷的插件。它帮助开发人员编写没有前缀的CSS3选择器。我不知道是否值得将它包含在我的网站中。

Prefix-free is a cool plugin by Lea Verou. It helps the developer to write CSS3 selectors with no prefix. I wonder if it is worthy to include it in my site.

我有一个网站有一些CSS3,我想知道如果加载一个JS文件,页面加载可能会降低我的页面的渲染速度,并影响客户端的性能?

I have a website with some CSS3 and I want to know if loading a JS file that changes the CSS after page loads may decrease my pages' render speed and affect the client side performance?

推荐答案

您的CSS降低您的网站的性能,无论是在JavaScript的执行时间和(重)渲染速度的网站。

Of course will the execution of a Javascript altering you CSS decrease the performance of your Site, both in terms of javascript-execution time and (re-)rendering-speed of you site.

javascript检查和更改所有的CSS。我更喜欢这样的预处理器,例如 SASS LESS ,您可以编写无前缀的CSS,并在将其传递给客户端之前生成相应的前缀CSS。当然这有一个缺点,有更大的css文件传输,但仍然是我喜欢的解决方案。

It is very costly to let javascript examine and alter all your CSS. I prefer such preprocessors like SASS or LESS which let you write prefix-free CSS and produce the according prefixed CSS before delivering it to the client. Of course this has the drawback of having bigger css-files to transfer, but still this is the solution I prefer.

你不需要编写必要的mixins自己,基本上有无数的扩展,这将为你的工作,并提供即用mixin。

You don't need to write the necessary mixins for yourself, there are basically countless extensions, that will do the work for you and provide ready-to-use mixins.

只是出于我的头顶:少了,可以使用 http://lessprefixer.com/ - Sass http://compass-style.org/

Just out of the top of my head: for less, one could use http://lessprefixer.com/ - for Sass http://compass-style.org/

这篇关于我应该包括“无前缀”插件在我的网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆