Well, something like this:


http://jsfiddle.net/wc2uje8e/2/
.block-to-show { display: none; } .link-to-hover:hover ~ .block-to-show { display: block; } <a class="link-to-hover">Hover me to see the block</a> <p>Anything else</p> <p class="block-to-show">This block is shown only when the link is hocered</p> <style> .some_block{ display:none; } a:hover .some_block{ display:block; } </style> <a href="#">some url<div class="some_block">some block</div></a> <a> tag 3. probably better to use javascript ? 4. Why so give an example? I personally do not doubt your abilities, but this decision is the worst! - Palmervan <a id="link" href="href">lnk</a> <div id="bk">fea</div> <script> var lnk=document.getElementById("link"); var bk=document.getElementById("bk"); lnk.onmouseover=function(){bk.style.visibility="visible"} lnk.onmouseout=function(){bk.style.visibility="hidden"} </script> <style> #bk{ position: absolute; top: 60px; left: 60px; width: 60px; height: 30px; background-color: #000000; visibility: hidden; } </style> event used inside an anonymous function? or am I misunderstood? - Palmervanотсутствует подход к дыбилобраузерам блок будет выскакивать при наведении на любой тег <a> наверное лучше использовать javascript? зачем так приводить пример? лично я не сомневаюсь в твоих способностях, но это решение самое ужасное!
Everything will work there normally
a: hover .some_block
This design indicates that it is for the block inside this particular A.
Source: https://ru.stackoverflow.com/questions/100791/
All Articles