小编Jur*_*raj的帖子

CSS - 选择具有以前缀开头的类的所有元素

需要定位具有特定类开头的每个元素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)

css wordpress

4
推荐指数
1
解决办法
3734
查看次数

自定义字体不适用于移动设备

@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)

css font-face

3
推荐指数
1
解决办法
4198
查看次数

标签 统计

css ×2

font-face ×1

wordpress ×1