Показать сообщение отдельно

  #9  
Старый 04.02.2024, 01:04
un1k
Познающий
Регистрация: 04.10.2023
Сообщений: 41
С нами: 1376200

Репутация: 0
По умолчанию

Цитата:
Сообщение от L2Banners  

Task:
There are 2 buttons, when we hover the cursor over one of them, the second disappears.
The task needs to be solved only using HTML and CSS
without using javascript

Yes, this is a good solution.

Try to solve this without using the pseudo-classes :is() and :has()
You can solve this using only one pseudo-class :hover. Then it will be more cross-browser
Oh, :has is supported by all major browsers, but this can also be made with * but I don't know if I would use it instead of :has

Цитата:

*, button:hover {
opacity: 0;
}
 
Ответить с цитированием