css - 在 css 的名称类中使用 *

标签 css html

<分区>

* 在 name class 的 css 中是什么意思?我认为是为了继承类

<style>
.ancestors *{ 
    display: block;
    border: 2px solid lightgrey;
    color: lightgrey;
    padding: 5px;
    margin: 15px;
}
</style>

最佳答案

这意味着什么。在这种情况下,它适用于具有 ancestors 类的元素中的任何元素。

关于css - 在 css 的名称类中使用 *,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22171772/

上一篇:javascript - 创建没有边界半径的圆 Angular block

下一篇:css - 按钮在换行时看起来很糟糕

相关文章:

html - 在容器 div 之外平均扩展子 div,两侧边距为 : 0 auto

javascript - 使用 id 作为数组的名称 (jQuery)

html - 即使设置为最大限制,Z-Index 也不起作用

javascript - div没有滚动条

java - 用java解析一个css文件

带有 jsfiddle ex : not working: vertical align and using full width based on width percentage of two child containers 的 Html css

html - 纯 CSS3 幻灯片重复最后 4 张幻灯片?

DOM 移除时的 CSS3 高度转换?

javascript - 我正在尝试以一种奇怪的方式用 python 创建一个网站

javascript - 使用 JavaScript 和 Canvas 制作动画