html - html>在CSS中表示什么?

标签 html css css-selectors

我在 Liferay 门户的一些 CSS 文件中有以下 CSS 代码。

html> 是什么意思?什么时候应该使用?

.lfr-dockbar-pinned {
    .dockbar {
        left: 0;
        position: fixed;
        right: 0;
        top: 0;
    }

    .pin-dockbar img {
        background-image: url(../images/dockbar/unpin.png);
    }
}

html > .lfr-dockbar-pinned {
    padding-top: 3.45em;
}

最佳答案

具有 lfr-dockbar-pinned 类的元素,它是 html 元素的直接子后代。请参阅:http://www.w3.org/TR/CSS2/selector.html#child-selectors

关于html - html>在CSS中表示什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16192848/

相关文章:

javascript - 使用 JS 的 100% 页面高度在某些页面上不起作用

css - 使用 CSS 设置 HTML 5 数据属性值

css - Flexbox 列的盒子大小是其他列的一半

jquery - 改变所有其他元素的背景颜色

css - 如何定位直接位于另一个 div 之后的 div,并且它们都在同一个父 div 中?

javascript - 如何使用 javascript 中的 onchange 函数显示多张图片?

html - 垂直居中不起作用

html - flex 布局溢出外容器

javascript - 如何为数组中的对象应用新类?

html - CSS - 大于选择器 - 选择大于 N 的元素