需要定位具有特定类开头的每个元素depth-
我尝试使用 CSS 进行定位:
[class^="depth-"] {
margin-left: 40px;
}
Run Code Online (Sandbox Code Playgroud)
但只有当目标班级是班级顺序中的第一个班级时,它才有效。
就我而言:
<div class="comment byuser comment-author-admin odd alt depth-2 parent" id="comment-13">
<div id="div-comment-13" class="media">
...
</div>
<div class="comment byuser comment-author-admin even depth-3" id="comment-14">
<div id="div-comment-14" class="media">
...
</div>
</div>
</div>
Run Code Online (Sandbox Code Playgroud) 我@font-face为我的字体 Rajdhani使用了 CSS 规则。在桌面上完美运行,但不适用于 Android 和 IOS 设备:
@font-face {
font-family: "Rajdhani";
src: url("/fonts/rajdhani-light.ttf") format("truetype"),
}
@font-face {
font-family: "Rajdhani";
src: url("/fonts/rajdhani-medium.ttf") format("truetype"),
}
@font-face {
font-family: "Rajdhani";
src: url("/fonts/rajdhani-regular.ttf") format("truetype"),
}
@font-face {
font-family: "Rajdhani";
src: url("/fonts/rajdhani-semibold.ttf") format("truetype"),
}
@font-face {
font-family: "Rajdhani";
src: url("/fonts/rajdhani-bold.ttf") format("truetype"),
}
Run Code Online (Sandbox Code Playgroud)