2014-08-28 90 views
0

出於某種原因,我的旋轉元素不服從溢出規則?我怎樣才能讓我的輪換部門包含在母公司?旋轉元素溢出

感謝您的提前幫助。

#box{ 
    float: left; 
    overflow: hidden; 
    background-position: center center; 
    background-repeat:no-repeat; 
    background-position: center center; 
    -webkit-background-size: cover; 
    -moz-background-size: cover; 
    -o-background-size: cover; 
    background-size: cover; 
} 

.full-width{ 
    width: 100%; 
    height: 900px; 
} 

#pull-out{ 
    width:1800px; 
    height: 1800px; 
    -ms-transform: rotate(45deg); 
    -webkit-transform: rotate(45deg); 
    transform: rotate(45deg); 
    background: #ffffff; 
    position: absolute; 
    right: -1273px; 
    top: -450px; 
} 


<div id="box" class="full-width" style="background-image: url(images/5.jpg)"> 
    <div id="pull-out"></div> 
</div> 

回答

0

這與內部div的定位有關。您需要使其相對於全寬div設置

position:relative; 

on .full-width div。

jsfiddle:http://jsfiddle.net/s8n88gce/1/