:lang伪类在CSS中的用法
使用:lang伪类可以指定在指定元素中使用的语言。此类在必须吸引多种语言的文档中很有用,这些语言对于某些语言结构具有不同的约定。
示例
您可以尝试运行以下代码来了解:lang伪类的用法
<html>
<head>
<style>
/* Two levels of quotes for two languages*/
:lang(en) { quotes: '"' '"' "'" "'"; }
:lang(fr) { quotes: "<<" ">>" "<" ">"; }
</style>
</head>
<body>
<p>...<q lang="fr">A quote in a paragraph</q>...</p>
</body>
</html>