📜  悬停在父元素上激活子元素 css 代码示例

📅  最后修改于: 2022-03-11 14:47:32.731000             🧑  作者: Mango

代码示例1
/* EXAMPLE
projetos-hover is father; projetos-hover-text is the child
When hover on the father use ">" to aply on a child
*/

.projetos-hover-text {
  transform: translateY(-50%);
  transition: all 0.2s ease 0s;
}

.projetos-hover:hover > .projetos-hover-text {
  transform: translatey(+5%);
}