0

Как при наведении на родительский блок parent изменить borderColor у дочернего блока children? Блок children является дочерним классом parent.

2
  • а разметку можно увидеть?
    – WVFFLIFE
    6 мар 2020 в 21:00
  • <div class="parent"><div class="children">block</div>text</div>
    – g6me
    7 мар 2020 в 5:18

1 ответ 1

1

.parent {
  background-color: chocolate;
  padding: 20px;
}

.children {
  background-color: gold;
  padding: 20px;
  border: 5px solid;
  border-color: white;
  transition: all 0.8s;
}

.parent:hover .children {
  border-color: red;
}
<div class="parent">
  <div class="children">block</div>
  text
</div>

1
  • это конечно не то) но все равно спасибо) я имел в виду createStyles, а не css)
    – g6me
    10 мар 2020 в 19:45

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.