position inherit 定位

inherit  继承父元素   定位

举例  :

<div class="father">

  <p></p>

</div>

div{

  position:fixed;

  left:0;

  top:0;

}

p{

  position:inherit;//继承了父元素的fixed;此时就会相对于浏览器定位;不会相对于父元素定位,阿懂?

  left:10000px;

  top:1000px;

}

原文地址:https://www.cnblogs.com/520BigBear/p/9075862.html