将css类名转换为随机字母 [英] Converting css class names to random letters

查看:235
本文介绍了将css类名转换为随机字母的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我阅读Facebook和Google的样式表,我注意到css样式中使用的类名是一些随机字母和数字?我们可以在开发网页后将所有css类名称转换为一些随机字母吗?他们是如何做到的?是否有任何工具可以做到这一点? 我相信你要找的答案与此处


Google使用了一种叫做 Google Web Toolkit (或简称
GWT)将Java应用程序编译为他们的Javascript / HTML / CSS
同行。 GWT用于GMail和Google Wave,我的假设是
,它也被用于G +。

GWT编译器(CS纯粹主义者永远不会调用GWT编译器,但
术语符合)以编程方式命名Javascript函数,CSS类,
HTML表单ID等,所以它们几乎永远不可读。



I read stylesheets of facebook and Google and i noticed that class names used in css styles are some random letters and numbers? can we convert all css classes names to some random letters after developing web page? how they did it? is there any tool for doing this?

解决方案

I believe the answer you're looking for is the same one given here:

Google uses something called the Google Web Toolkit (or simply GWT) to compile Java "applications" into their Javascript/HTML/CSS counterparts. GWT was used for GMail and Google Wave and my assumption is that it was also used for G+.

The GWT "compiler" (CS purists would never call GWT a compiler but the term fits) programatically names Javascript functions, CSS classes, HTML form IDs, etc. so they are almost never something legible.

这篇关于将css类名转换为随机字母的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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