CSS类名称中的随机字符 [英] Random characters in CSS class names
本文介绍了CSS类名称中的随机字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我注意到一件事.在某些网站上,例如tray.io,asana,fb等,当您检查它们时,它们在css类名中具有随机字符,例如:
I have noticed one thing. On some sites such as tray.io, asana, fb etc They have random characters in css class names when you inspect them for example:
<header class="Header_XSDsdksdXKkSDD">..</Header>
为什么生成这些字符以及如何生成它们?
Why are these characters generated and how are they generated?
谢谢.
推荐答案
那些类名或标识符可能是由产生页面输出的引擎生成的.
Those class names or identifiers are probably generated by the engine that produces the page output.
如果要向特定元素添加样式,则需要一个唯一的类-最简单的方法是生成一些伪随机标识符.
If you want to add a style to a particular element, you want a unique class for it - the easiest way is to generate some pseudo-random identifier.
这篇关于CSS类名称中的随机字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文