“CSS membuat hover pada anak orang tua bergerak” Kode Jawaban

Parent Hover dan anak melayang pada saat yang sama

.child-container {
	margin-right: 5px;
    padding: 10px 12px;
    border-radius: 50%;
}
            
.parent-container:hover {
	color: rgb(20, 89, 136); //This is the color for all the child-container when parent is hover//
}

.parent-container:hover .child-container {
	background-color: rgb(10, 23, 31); //This is the background-color of the chosen child-container//
}
//When you hover the parent-container, the chosen child-container hover will also work along with the parent-container hover//
//The chosen child-container has also hover style different from the parent-container hover//
//If the parent-container is mouse hover the child-container hover will be trigger too//
Ryan Hood

cara memilih anak saat mengarahkan arwah di elemen induk CSS

/* Selecting a child element on :hover parent element*/ 
.parent:hover .child {
   /* ... */
}
deejay

CSS membuat hover pada anak orang tua bergerak

.parent {
    background: white;
    pointer-events: none; // this disable the hover on the .parent

    &:hover {
      background: gray; // hover applied to .parent but disabled by the previous pointer-events: none;
    }
    a {
      pointer-events: auto; // this enable the pointer again
      &:hover {
        color: red; // this hover only for the a 
      }
    }
}
Thoughtless Tuatara

Jawaban yang mirip dengan “CSS membuat hover pada anak orang tua bergerak”

Pertanyaan yang mirip dengan “CSS membuat hover pada anak orang tua bergerak”

Lebih banyak jawaban terkait untuk “CSS membuat hover pada anak orang tua bergerak” di CSS

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya