跨越主要div

时间:2015-07-14 07:00:24

标签: javascript html css

如何设置css或javascript以检测该跨度是否来自div?

<div class="divMain"> 
 <span class="title">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut in diam </span>
 <span class="boxLike">
  <nobr>
   <span class="comment">Span out of div</span>
   <span class="like">Span out of div 2</span>
  </nobr>
 </span>
</div>

Code in link

1 个答案:

答案 0 :(得分:0)

查看计算div和span偏移量和高度的结果。根据值,您可以说跨度超出div http://jsfiddle.net/40f3mqzo/5/

background: url("pah_to_my_logo.jpg") linear-gradient(
    top,
    #47F7FE,
    #3EC6DC
);