<div class="show-content"><div class="p_w_picpath-package">

<img src="http://upload-p_w_picpaths.jianshu.io/upload_p_w_picpaths/647982-cec1965607e9889a.png?p_w_picpathMogr2/auto-orient/strip%7Cp_w_picpathView2/2/w/1240" data-original-src="http://upload-p_w_picpaths.jianshu.io/upload_p_w_picpaths/647982-cec1965607e9889a.png?p_w_picpathMogr2/auto-orient/strip%7Cp_w_picpathView2/2"><br><div class="p_w_picpath-caption"></div>

</div>

<p><a href="http://bbs.520it.com/forum.php?mod=viewthread&amp;tid=2418" target="_blank">配套视频下载地址</a></p>

<h2>定位</h2>

<h3>相对定位</h3>

<ul>

<li>

<p>什么是相对定位? </p>

<ul>

<li>对定位就是相对于自己以前在标准流中的位置来移动</li>

</ul>

</li>

<li>

<p>格式:</p>

<ul>

<li><code>position: relative;</code></li>

</ul>

</li>

<li>

<p>示例程序</p>

</li>

</ul>

<pre><code class="html">&lt;style&gt;

        *{

            margin: 0;

            padding: 0;

        }

        div{

            width: 100px;

            height: 100px;

        }

        .box1{

            background-color: red;

        }

        .box2{

            background-color: green;

            position: relative;

            top: 20px;

            left: 20px;

        }

        .box3{

            background-color: blue;

        }

&lt;style&gt;


&lt;div class="box1"&gt;&lt;/div&gt;

&lt;div class="box2"&gt;&lt;/div&gt;

&lt;div class="box3"&gt;&lt;/div&gt;</code></pre>

<div class="p_w_picpath-package">

<img src="http://upload-p_w_picpaths.jianshu.io/upload_p_w_picpaths/647982-47980ccaaa124dde.png?p_w_picpathMogr2/auto-orient/strip%7Cp_w_picpathView2/2/w/1240" data-original-src="http://upload-p_w_picpaths.jianshu.io/upload_p_w_picpaths/647982-47980ccaaa124dde.png?p_w_picpathMogr2/auto-orient/strip%7Cp_w_picpathView2/2"><br><div class="p_w_picpath-caption"></div>

</div>

<ul>

<li>

<p>相对定位注意点:</p>

<ul>

<li>在相对定位中同一个方向上的定位属性只能使用一个<ul>

<li>top/bottom 只能用一个</li>

<li>left/right 只能用一个</li>

</ul>

</li>

<li>相对定位是不脱离标准流的, 会继续在标准流中占用一份空间</li>

<li>由于相对定位是不脱离标准流的, 所以在相对定位中区分块级元素/行内元素/行内块级元素</li>

<li>由于相对定位是不脱离标准流的, 并且相对定位的元素会占用标准流中的位置, 所以当给相对定位的元素设置margin/padding等属性的时会影响到标准流的布局</li>

<li><div class="p_w_picpath-package">

<img src="http://upload-p_w_picpaths.jianshu.io/upload_p_w_picpaths/647982-56d509caaef234e7.png?p_w_picpathMogr2/auto-orient/strip%7Cp_w_picpathView2/2/w/1240" data-original-src="http://upload-p_w_picpaths.jianshu.io/upload_p_w_picpaths/647982-56d509caaef234e7.png?p_w_picpathMogr2/auto-orient/strip%7Cp_w_picpathView2/2"><br><div class="p_w_picpath-caption"></div>

</div></li>

</ul>

</li>

<li>

<p>相对定位应用场景:</p>

<ul>

<li>

<p>用于对元素进行微调</p>

<ul>

<li>

<pre><code class="html">input{

 width: 200px;

 height: 50px;

}

img{

 width: 100px;

 height: 50px;


 position: relative;

 top: 20px;

}</code></pre>

</li>

<li><div class="p_w_picpath-package">

<img src="http://upload-p_w_picpaths.jianshu.io/upload_p_w_picpaths/647982-faf2a4c295488ed9.png?p_w_picpathMogr2/auto-orient/strip%7Cp_w_picpathView2/2/w/1240" data-original-src="http://upload-p_w_picpaths.jianshu.io/upload_p_w_picpaths/647982-faf2a4c295488ed9.png?p_w_picpathMogr2/auto-orient/strip%7Cp_w_picpathView2/2"><br><div class="p_w_picpath-caption"></div>

</div></li>

<li><div class="p_w_picpath-package">

<img src="http://upload-p_w_picpaths.jianshu.io/upload_p_w_picpaths/647982-f9fc00e083f01cb8.png?p_w_picpathMogr2/auto-orient/strip%7Cp_w_picpathView2/2/w/1240" data-original-src="http://upload-p_w_picpaths.jianshu.io/upload_p_w_picpaths/647982-f9fc00e083f01cb8.png?p_w_picpathMogr2/auto-orient/strip%7Cp_w_picpathView2/2"><br><div class="p_w_picpath-caption"></div>

</div></li>

</ul>

</li>

<li>

<p>配合后面学习的绝对定位来使用</p>

</li>

</ul>

</li>

</ul>

<h3>绝对定位</h3>

<ul>

<li>

<p>什么是绝对定位?</p>

<ul>

<li>绝对定位就是相对于body或者某个定位流中的祖先元素来定位</li>

</ul>

</li>

<li>

<p>格式:</p>

<ul>

<li><code>position: absolute;</code></li>

</ul>

</li>

<li>

<p>示例代码</p>

</li>

</ul>

<pre><code class="html">&lt;style&gt;

        *{

            margin: 0;

            padding: 0;

        }

        div{

            width: 100px;

            height: 100px;

        }

        .box1{

            background-color: red;

        }

        .box2{

            background-color: green;

            position: absolute;

            left: 0;

            top: 0;

        }

        .box3{

            background-color: blue;

        }

&lt;/style&gt;


&lt;div class="box1"&gt;&lt;/div&gt;

&lt;div class="box2"&gt;&lt;/div&gt;

&lt;div class="box3"&gt;&lt;/div&gt;</code></pre>

<div class="p_w_picpath-package">

<img src="http://upload-p_w_picpaths.jianshu.io/upload_p_w_picpaths/647982-e6e893062a9c0554.png?p_w_picpathMogr2/auto-orient/strip%7Cp_w_picpathView2/2/w/1240" data-original-src="http://upload-p_w_picpaths.jianshu.io/upload_p_w_picpaths/647982-e6e893062a9c0554.png?p_w_picpathMogr2/auto-orient/strip%7Cp_w_picpathView2/2"><br><div class="p_w_picpath-caption"></div>

</div>

<div class="p_w_picpath-package">

<img src="http://upload-p_w_picpaths.jianshu.io/upload_p_w_picpaths/647982-3cf618f2cedbfe0d.png?p_w_picpathMogr2/auto-orient/strip%7Cp_w_picpathView2/2/w/1240" data-original-src="http://upload-p_w_picpaths.jianshu.io/upload_p_w_picpaths/647982-3cf618f2cedbfe0d.png?p_w_picpathMogr2/auto-orient/strip%7Cp_w_picpathView2/2"><br><div class="p_w_picpath-caption"></div>

</div>

<ul>

<li>绝对定位注意点:<ul>

<li>绝对定位的元素是脱离标准流的, 不会占用标准流中的位置</li>

<li>由于绝对定位的元素是脱离标准流的, 所以绝对定位的元素不区分块级元素/行内元素/行内块级元素</li>

<li>如果一个绝对定位的元素是以body作为参考点, 那么其实是以网页首屏的宽度和高度作为参考点, 而不是以整个网页的宽度和高度作为参考点<ul>

<li>相对于body定位会随着页面的滚动而滚动</li>

</ul>

</li>

<li>一个绝对定位的元素会忽略祖先元素的padding</li>

</ul>

</li>

</ul>

<pre><code class="html">&lt;style&gt;

        *{

            margin: 0;

            padding: 0;

        }

        .box1{

            width: 300px;

            height: 300px;

            background-color: red;

            border: 10px solid #000;

            padding: 30px;

            position: relative;

            box-sizing: border-box;

        }

        .box2{

            width: 100px;

            height: 100px;

            background-color: green;

            position: absolute;

            left: 0;

            top: 0;

        }

&lt;/style&gt;


&lt;div class="box1"&gt;

    &lt;div class="box2"&gt;&lt;/div&gt;

&lt;/div&gt;</code></pre>

<div class="p_w_picpath-package">

<img src="http://upload-p_w_picpaths.jianshu.io/upload_p_w_picpaths/647982-4cdaedc68caa4635.png?p_w_picpathMogr2/auto-orient/strip%7Cp_w_picpathView2/2/w/1240" data-original-src="http://upload-p_w_picpaths.jianshu.io/upload_p_w_picpaths/647982-4cdaedc68caa4635.png?p_w_picpathMogr2/auto-orient/strip%7Cp_w_picpathView2/2"><br><div class="p_w_picpath-caption"></div>

</div>

<div class="p_w_picpath-package">

<img src="http://upload-p_w_picpaths.jianshu.io/upload_p_w_picpaths/647982-6e0034f9234bc504.png?p_w_picpathMogr2/auto-orient/strip%7Cp_w_picpathView2/2/w/1240" data-original-src="http://upload-p_w_picpaths.jianshu.io/upload_p_w_picpaths/647982-6e0034f9234bc504.png?p_w_picpathMogr2/auto-orient/strip%7Cp_w_picpathView2/2"><br><div class="p_w_picpath-caption"></div>

</div>

<ul>

<li>绝对定位参考点:<ul>

<li>默认情况下所有的绝对定位的元素, 无论有没有祖先元素, 都会以body作为参考点</li>

<li>如果一个绝对定位的元素有祖先元素, 并且祖先元素中有一个是定位流中的元素, 那么这个绝对定位的元素就会以定位流的那个祖先元素作为参考点</li>

<li>如果一个绝对定位的元素有祖先元素, 并且祖先元素中有多个是定位流中的元素, 那么这个绝对定位的元素会以离它最近的那个定位流的祖先元素为参考点</li>

</ul>

</li>

</ul>

<pre><code class="html">&lt;style&gt;

        *{

            margin: 0;

            padding: 0;

        }

        .box1{

            width: 300px;

            height: 300px;

            background-color: red;

            position: relative;

        }

        .box2{

            width: 200px;

            height: 200px;

            background-color: green;

        }

        .box3{

            width: 100px;

            height: 100px;

            background-color: blue;

            position: absolute;

            left: 0;

            bottom: 0;

          }

&lt;/style&gt;


&lt;div class="box1"&gt;

    &lt;div class="box2"&gt;

        &lt;div class="box3"&gt;&lt;/div&gt;

    &lt;/div&gt;

&lt;/div&gt;</code></pre>

<div class="p_w_picpath-package">

<img src="http://upload-p_w_picpaths.jianshu.io/upload_p_w_picpaths/647982-d648fccadfa59153.png?p_w_picpathMogr2/auto-orient/strip%7Cp_w_picpathView2/2/w/1240" data-original-src="http://upload-p_w_picpaths.jianshu.io/upload_p_w_picpaths/647982-d648fccadfa59153.png?p_w_picpathMogr2/auto-orient/strip%7Cp_w_picpathView2/2"><br><div class="p_w_picpath-caption"></div>

</div>

<pre><code class="html">&lt;style&gt;

        *{

            margin: 0;

            padding: 0;

        }

        .box1{

            width: 300px;

            height: 300px;

            background-color: red;

            position: relative;

        }

        .box2{

            width: 200px;

            height: 200px;

            background-color: green;

            position: relative;

        }

        .box3{

            width: 100px;

            height: 100px;

            background-color: blue;

            position: absolute;

            left: 0;

            bottom: 0;

          }

&lt;/style&gt;


&lt;div class="box1"&gt;

    &lt;div class="box2"&gt;

        &lt;div class="box3"&gt;&lt;/div&gt;

    &lt;/div&gt;

&lt;/div&gt;</code></pre>

<div class="p_w_picpath-package">

<img src="http://upload-p_w_picpaths.jianshu.io/upload_p_w_picpaths/647982-11f55e5472fe5557.png?p_w_picpathMogr2/auto-orient/strip%7Cp_w_picpathView2/2/w/1240" data-original-src="http://upload-p_w_picpaths.jianshu.io/upload_p_w_picpaths/647982-11f55e5472fe5557.png?p_w_picpathMogr2/auto-orient/strip%7Cp_w_picpathView2/2"><br><div class="p_w_picpath-caption"></div>

</div>

<ul>

<li>绝对定位水平居中<ul>

<li>1.注意当一个盒子绝对定位之后不能使用margin: 0 auto;让盒子自身居中</li>

<li>2.如果想让过一个绝对定位的盒子自身居中, 可以使用left: 50%; margin-left:-元素宽度一半px;</li>

</ul>

</li>

</ul>

<pre><code class="html">&lt;!DOCTYPE html&gt;

&lt;html lang="en"&gt;

&lt;head&gt;

    &lt;meta charset="UTF-8"&gt;

    &lt;title&gt;74-绝对定位水平居中&lt;/title&gt;

    &lt;style&gt;

        *{

            margin: 0;

            padding: 0;

        }

        div{

            width: 400px;

            height: 50px;

            background-color: red;

            position: absolute;

            /*无效*/

            /*margin: 0 auto;*/

            /*有效*/

            left: 50%;

            margin-left:-200px;

        }

    &lt;/style&gt;

&lt;/head&gt;

&lt;body&gt;

&lt;div&gt;&lt;/div&gt;

&lt;/body&gt;

&lt;/html&gt;</code></pre>

<ul>

<li>绝对定位应用场景:<ul>

<li>用于对元素进行微调</li>

<li>配合后面学习的绝对定位来使用</li>

</ul>

</li>

</ul>

<h3>子绝父相</h3>

<ul>

<li>

<p>企业开发中一般相对定位和绝对定位都是一起出现, 很少单独使用</p>

</li>

<li>

<p>为什么要子绝父相?</p>

</li>

</ul>

<pre><code class="html">&lt;!DOCTYPE html&gt;

&lt;html lang="en"&gt;

&lt;head&gt;

    &lt;meta charset="UTF-8"&gt;

    &lt;title&gt;71-子绝父相&lt;/title&gt;

    &lt;style&gt;

        *{

            margin: 0;

            padding: 0;

        }

        ul{

            width: 800px;

            height: 50px;

            background-color: red;

            list-style: none;

            margin: 0px auto;

            margin-top: 100px;

        }

        li{

            width: 100px;

            /*height: 50px;*/

            line-height: 50px;

            float: left;

            background-color: gray;

            text-align: center;

        }

        .li03{

            background-color: darkgray;

            position: relative;

        }

        ul li img{

            /*

            缺点以前的位置仍然被占用, 不能让文字居中对齐

            */


            /*position: relative;

            left: -35px;

            top: -15px;*/


            /* 浏览器调整之后位置会发生变化*/


           /* position: absolute;

            top: 95px;

            left: 535px;*/



            position: absolute;

            left: 37px;

            top: -5px;


        }

    &lt;/style&gt;

&lt;/head&gt;

&lt;body&gt;

&lt;ul&gt;

    &lt;li&gt;服装城&lt;/li&gt;

    &lt;li&gt;美妆馆&lt;/li&gt;

    &lt;li&gt;京东超市&lt;/li&gt;

    &lt;li class="li03"&gt;全球购&lt;img src="hot.png" alt=""&gt;&lt;/li&gt;

    &lt;li&gt;闪购&lt;/li&gt;

    &lt;li&gt;团购&lt;/li&gt;

    &lt;li&gt;拍卖&lt;/li&gt;

    &lt;li&gt;江哥&lt;/li&gt;

&lt;/ul&gt;

&lt;/body&gt;

&lt;/html&gt;</code></pre>

<div class="p_w_picpath-package">

<img src="http://upload-p_w_picpaths.jianshu.io/upload_p_w_picpaths/647982-5c6f2a7acd065e6c.png?p_w_picpathMogr2/auto-orient/strip%7Cp_w_picpathView2/2/w/1240" data-original-src="http://upload-p_w_picpaths.jianshu.io/upload_p_w_picpaths/647982-5c6f2a7acd065e6c.png?p_w_picpathMogr2/auto-orient/strip%7Cp_w_picpathView2/2"><br><div class="p_w_picpath-caption"></div>

</div>

<div class="p_w_picpath-package">

<img src="http://upload-p_w_picpaths.jianshu.io/upload_p_w_picpaths/647982-93b186dcaa53cdc6.png?p_w_picpathMogr2/auto-orient/strip%7Cp_w_picpathView2/2/w/1240" data-original-src="http://upload-p_w_picpaths.jianshu.io/upload_p_w_picpaths/647982-93b186dcaa53cdc6.png?p_w_picpathMogr2/auto-orient/strip%7Cp_w_picpathView2/2"><br><div class="p_w_picpath-caption"></div>

</div>

<div class="p_w_picpath-package">

<img src="http://upload-p_w_picpaths.jianshu.io/upload_p_w_picpaths/647982-761dd81edd14e8bb.png?p_w_picpathMogr2/auto-orient/strip%7Cp_w_picpathView2/2/w/1240" data-original-src="http://upload-p_w_picpaths.jianshu.io/upload_p_w_picpaths/647982-761dd81edd14e8bb.png?p_w_picpathMogr2/auto-orient/strip%7Cp_w_picpathView2/2"><br><div class="p_w_picpath-caption"></div>

</div>

<ul>

<li>相对定位和绝对定位一般都是用来做覆盖效果的, 当看到某个元素覆盖在另外一个元素上时, 第一时间就要想到定位流</li>

</ul>

<div class="p_w_picpath-package">

<img src="http://upload-p_w_picpaths.jianshu.io/upload_p_w_picpaths/647982-b7b148010e500ffd.png?p_w_picpathMogr2/auto-orient/strip%7Cp_w_picpathView2/2/w/1240" data-original-src="http://upload-p_w_picpaths.jianshu.io/upload_p_w_picpaths/647982-b7b148010e500ffd.png?p_w_picpathMogr2/auto-orient/strip%7Cp_w_picpathView2/2"><br><div class="p_w_picpath-caption"></div>

</div>

<div class="p_w_picpath-package">

<img src="http://upload-p_w_picpaths.jianshu.io/upload_p_w_picpaths/647982-eba0b0f77d4bc862.png?p_w_picpathMogr2/auto-orient/strip%7Cp_w_picpathView2/2/w/1240" data-original-src="http://upload-p_w_picpaths.jianshu.io/upload_p_w_picpaths/647982-eba0b0f77d4bc862.png?p_w_picpathMogr2/auto-orient/strip%7Cp_w_picpathView2/2"><br><div class="p_w_picpath-caption"></div>

</div>

<h3>固定定位</h3>

<ul>

<li>

<p>什么是固定定位?</p>

<ul>

<li>固定定位和前面学习的背景关联方式很像, 背景关联方式可以让某个图片不随着滚动条的滚动而滚动, 而固定定位可以让某个盒子不随着滚动条的滚动而滚动</li>

</ul>

</li>

<li>

<p>格式:</p>

<ul>

<li><code>position: fixed;</code></li>

</ul>

</li>

<li>

<p>示例代码</p>

</li>

</ul>

<pre><code class="html">&lt;!DOCTYPE html&gt;

&lt;html lang="en"&gt;

&lt;head&gt;

    &lt;meta charset="UTF-8"&gt;

    &lt;title&gt;74-固定定位&lt;/title&gt;

    &lt;style&gt;

        *{

            margin: 0;

            padding: 0;

        }

        p{

            width: 100px;

        }

        a{


            width: 50px;

            height: 50px;

            background-color: rgba(0, 0, 0, 0.3);

            border-radius: 25px;

            text-decoration: none;

            text-align: center;

            color: #000;


            position: fixed;

            right: 10px;

            bottom: 10px;

        }


    &lt;/style&gt;

&lt;/head&gt;

&lt;body&gt;

&lt;p&gt;我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字我是文字&lt;/p&gt;


&lt;a href="#"&gt;^&lt;br&gt;顶部&lt;/a&gt;


&lt;/body&gt;

&lt;/html&gt;</code></pre>

<div class="p_w_picpath-package">

<img src="http://upload-p_w_picpaths.jianshu.io/upload_p_w_picpaths/647982-af5dbbfbc3497201.png?p_w_picpathMogr2/auto-orient/strip%7Cp_w_picpathView2/2/w/1240" data-original-src="http://upload-p_w_picpaths.jianshu.io/upload_p_w_picpaths/647982-af5dbbfbc3497201.png?p_w_picpathMogr2/auto-orient/strip%7Cp_w_picpathView2/2"><br><div class="p_w_picpath-caption"></div>

</div>

<ul>

<li>

<p>固定定位注意点:</p>

<ul>

<li>固定定位的元素是脱离标准流的, 不会占用标准流中的位置</li>

<li>由于固定定位的元素是脱离标准流的, 所以绝对定位的元素不区分块级元素/行内元素/行内块级元素</li>

<li>IE6不支持固定定位</li>

</ul>

</li>

<li>

<p>固定定位应用场景:</p>

<ul>

<li>网页对联广告</li>

<li>网页头部通栏(穿透效果)</li>

</ul>

</li>

</ul>

<div class="p_w_picpath-package">

<img src="http://upload-p_w_picpaths.jianshu.io/upload_p_w_picpaths/647982-121d0d14e128e352.png?p_w_picpathMogr2/auto-orient/strip%7Cp_w_picpathView2/2/w/1240" data-original-src="http://upload-p_w_picpaths.jianshu.io/upload_p_w_picpaths/647982-121d0d14e128e352.png?p_w_picpathMogr2/auto-orient/strip%7Cp_w_picpathView2/2"><br><div class="p_w_picpath-caption"></div>

</div>

<h3>静态定位</h3>

<ul>

<li>

<p>什么是静态定位?</p>

<ul>

<li>默认情况下标准流中的元素position属性就等于static, 所以静态定位其实就是默认的标准流</li>

</ul>

</li>

<li>

<p>静态定位应用场景:</p>

<ul>

<li>一般用于配合JS清除定位属性<h3>z-index属性</h3>

</li>

</ul>

</li>

<li>

<p>什么是z-index值?</p>

<ul>

<li>用于指定定位的元素的覆盖关系</li>

</ul>

</li>

<li>

<p>定位元素的覆盖关系:</p>

<ul>

<li>默认情况下定位的元素一定会盖住没有定位的元素</li>

<li>默认情况下写在后面的定位元素会盖住前面的定位元素</li>

<li>默认情况下所有元素的z-index值都是0, 如果设置了元素的z-index值, 那么谁比较大谁就显示在前面</li>

<li>定位元素的从父现象<ul>

<li>父元素没有z-index值, 那么子元素谁的z-index大谁盖住谁</li>

<li>父元素z-index值不一样, 那么父元素谁的z-index大谁盖住谁</li>

</ul>

</li>

</ul>

</li>

</ul>

<div class="p_w_picpath-package">

<img src="http://upload-p_w_picpaths.jianshu.io/upload_p_w_picpaths/647982-e383ad4c7cd282bc.png?p_w_picpathMogr2/auto-orient/strip%7Cp_w_picpathView2/2/w/1240" data-original-src="http://upload-p_w_picpaths.jianshu.io/upload_p_w_picpaths/647982-e383ad4c7cd282bc.png?p_w_picpathMogr2/auto-orient/strip%7Cp_w_picpathView2/2"><br><div class="p_w_picpath-caption"></div>

</div>

<div class="p_w_picpath-package">

<img src="http://upload-p_w_picpaths.jianshu.io/upload_p_w_picpaths/647982-c675d8d96dce4fc9.png?p_w_picpathMogr2/auto-orient/strip%7Cp_w_picpathView2/2/w/1240" data-original-src="http://upload-p_w_picpaths.jianshu.io/upload_p_w_picpaths/647982-c675d8d96dce4fc9.png?p_w_picpathMogr2/auto-orient/strip%7Cp_w_picpathView2/2"><br><div class="p_w_picpath-caption"></div>

</div>

<div class="p_w_picpath-package">

<img src="http://upload-p_w_picpaths.jianshu.io/upload_p_w_picpaths/647982-36354235451cf2c0.png?p_w_picpathMogr2/auto-orient/strip%7Cp_w_picpathView2/2/w/1240" data-original-src="http://upload-p_w_picpaths.jianshu.io/upload_p_w_picpaths/647982-36354235451cf2c0.png?p_w_picpathMogr2/auto-orient/strip%7Cp_w_picpathView2/2"><br><div class="p_w_picpath-caption"></div>

</div>

<div class="p_w_picpath-package">

<img src="http://upload-p_w_picpaths.jianshu.io/upload_p_w_picpaths/647982-ff23ed179cb3191a.png?p_w_picpathMogr2/auto-orient/strip%7Cp_w_picpathView2/2/w/1240" data-original-src="http://upload-p_w_picpaths.jianshu.io/upload_p_w_picpaths/647982-ff23ed179cb3191a.png?p_w_picpathMogr2/auto-orient/strip%7Cp_w_picpathView2/2"><br><div class="p_w_picpath-caption"></div>

</div>

<div class="p_w_picpath-package">

<img src="http://upload-p_w_picpaths.jianshu.io/upload_p_w_picpaths/647982-f8b3f0b4885f4f3d.png?p_w_picpathMogr2/auto-orient/strip%7Cp_w_picpathView2/2/w/1240" data-original-src="http://upload-p_w_picpaths.jianshu.io/upload_p_w_picpaths/647982-f8b3f0b4885f4f3d.png?p_w_picpathMogr2/auto-orient/strip%7Cp_w_picpathView2/2"><br><div class="p_w_picpath-caption"></div>

</div>

<ul>

<li>z-index应用场景<ul>

<li>控制界面上的定位元素的覆盖关系, 例如网页中后面的定位元素不能覆盖前面的导航条通栏</li>

</ul>

</li>

</ul>

</div>