2013-07-02 29 views
0

如何在不干擾文字開始位置的情況下輕輕推動左側轉角。如何使用z-index推入div?

的jsfiddle:http://jsfiddle.net/gnjNq/

<div class="quick-links-container"> 
    <div class="left-corner"></div> 
    QUICK LINKS 
</div> 
.quick-links-container{ 
    z-index: 8000; 
    right: 20px; 
    background-color: white; 
    height: 500px; 
    width: 200px; 
    position: absolute; 
    box-shadow:0px 4px 6px rgba(0,0,0,.2); 
} 

.left-corner{ 
    height: 25px; 
    width: 25px; 
    transform: rotate(45deg); 
    -webkit-transform: rotate(45deg); 
    -moz-transform: rotate(45deg); 
    -o-transform: rotate(45deg); 
    -ms-transform: rotate(45deg); 
    background-color: white; 
    box-shadow:0px 4px 6px rgba(0,0,0,.2); 
    z-index: 7900; 
    position: relative; 
    left:-10px; 
    top: 20px; 
} 

這就是我想要實現:
enter image description here

回答

3

http://jsfiddle.net/gnjNq/3/Z-index爲負值去後面卸下z-index需要集裝箱。

+0

良好的通話,但我需要回去進一步,過去.quick鏈接容器 – Chaddly

+0

好,擺脫了容器上的z指數:http://jsfiddle.net/ gnjNq/3 /請注意,你的影子,你將有一個通過標籤部分的線... –

+0

太棒了!我會移動陰影。謝謝你! – Chaddly

4

刪除z-index.quick-links-container並給予.left-cornerz-index

​​