There is such code:
<h1>Заголовок</h1> <div> <p>Текст</p> </div> How to make that when you hover the cursor on the " text " styles are changed for the " title "?
There is such code:
<h1>Заголовок</h1> <div> <p>Текст</p> </div> How to make that when you hover the cursor on the " text " styles are changed for the " title "?
div.ph_hidden_yes { position: relative; height:0; width: 320px; opacity:0; transition:1s; } div.photo_hidden:hover + div.ph_hidden_yes { display: block; height:205px; opacity:1; } <div class="photo_hidden"> текст </div> <div class="ph_hidden_yes"> тра ля ля </div> .section { background:#ccc; } .layer { background:#ddd; } .section:hover img { border:2px solid #333; } .section:hover .layer { border:2px solid #F90; } <div class="section"> <img src="myImage.jpg" /> <div class="layer">Lorem Ipsum</div> </div> var bg = document.getElementById('dad'); document.getElementById('not').addEventListener("mouseover", function(){bg.style.background = "#c00";this.addEventListener("mouseout", function(){bg.style.background = "";}); }); <div class="daddy"><a id="dad" href="#d">need-url</a></div> <div class="notsun"><a id="not" href="#d">url</a></div> <h1 id="title">Заголовок</h1> <div> <p onmouseenter=" document.getElementById('title').style.color = 'red';" onmouseout=" document.getElementById('title').style.color = 'black';">Текст</p> </div> Source: https://ru.stackoverflow.com/questions/595906/
All Articles