2011-12-15 12 views
7

मैं सिर्फ एक जवाब में इस कोड को देखा:है: होवर केवल बाल तत्वों तक ही सीमित है?

एचटीएमएल

<div class="thumbnail"> 
    <img src="http://placehold.it/50x50"> 
    <img class="overthumb" src="http://placehold.it/200x200"> 
</div> 

सीएसएस

.overthumb { display: none; } 

.thumbnail:hover .overthumb { 
    position: absolute; 
    top: 15px; left: 15px; 
    display: inline; 
} 

लाइव यहाँ डेमो: http://jsfiddle.net/6wQp3/

इस कोड .overthumb काम करने के लिए एक ठंडा होना चाहिए .thumbnail का डी।

लेकिन कुछ भी इस कोड है यदि:

<div class="thumbnail"> 
    <img src="http://placehold.it/50x50"> 
</div> 
<p>tttttttttt</p> 

आप का चयन कैसे होगा p टैग यदि .thumbnail hovered है?

उत्तर

संबंधित मुद्दे