Home > front end >  The problem of CSS selectors, solving
The problem of CSS selectors, solving

Time:09-30

Like hover pseudo class ever written as
A: hover. (a parent)

Probably means a label after the hover can let its parent or parent in effect at the same level

CodePudding user response:

A: hover div {
Background - color: red;
}
Calculate the move to a parent div background color on a
Don't know what to say with you is the same meaning

CodePudding user response:

There's no such selector

CodePudding user response:

refer to the second floor sky waves reply:
without this selector
ok thank you very much

CodePudding user response:

reference 1/f, demon, knife reply:
a: hover div {
Background - color: red;
}
Calculate the move to a parent div background color on a
Don't know what to say with you is the same mean
this implementation

CodePudding user response:

reference 1/f, demon, knife reply:
a: hover div {
Background - color: red;
}
Calculate the move to a parent div background color on a
Don't know what to say with you is the same mean

You this div is a child, not the parent

CodePudding user response:

The forehead learned but is connected to the next level use + should
Div. A + div. B
A: hover + B {
}

CodePudding user response:

refer to 6th floor demon, knife reply:
well learned but is connected to the next level use + should
Div. A + div. B
A: hover + B {
}
element can be used well child elements and brothers

CodePudding user response:

This can use sass/less, to the parent set an id/class

A: hover {
# div {
}
}

Convenient for some

CodePudding user response:

refer to the eighth floor CriusWhisper response:
this can use sass/less, to the parent level set an id/class

A: hover {
# div {
}
}

Write some convenient
good thank you, I try tomorrow

CodePudding user response:

refer to the eighth floor CriusWhisper response:
this can use sass/less, to the parent level set an id/class

A: hover {
# div {
}
}

Write some convenient
this method I like

CodePudding user response:

CSS selectors can't choose the parent element in child elements, to achieve words can only write js use trigger event bubbling mechanism

CodePudding user response:

Can't, only can use the selector to select can be used

CodePudding user response:

CSS rendering mechanism is successively once upon a time, from the top down, that is, I can choose their own, their own offspring, after his brother, but cannot choose in front of his brother, his daddy

CodePudding user response:

To trigger an animation, and have a look

CodePudding user response:

reference 1/f, demon, knife reply:
a: hover div {
Background - color: red;
}
Calculate the move to a parent div background color on a
Don't know what to say with you is the same mean
this choice is a div elements inside

CodePudding user response:

CSS, js can achieve a similar effect

CodePudding user response:

As if no such that a: hover, class or id to add in front of it,
":" behind the description for a particular function.
  • Related