html – CSS在绝对块中剪切图像

我正试图用绝对块切割图像.我想隐藏右图像(红线)左列高度.

JSFiddle

.relative {
    position: relative;
}

.box {
    position: relative;  
}

.border {
    border: 1px solid red;
}

.inside {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;      
}
<div class="container">
    <div class="row border">
        <div class="col-xs-4">
            <img src="http://lorempixel.com/300/500/nature/" class="img-responsive"/>
        </div>
        <div class="col-xs-8 relative">
            <div class="box">
                <div class="inside">
                    <img src="http://lorempixel.com/800/1000/nature/" class="img-responsive"/>
                </div>
            </div>
        </div>
    </div>    
</div>

最佳答案 你的意思是这样的:

https://jsfiddle.net/82ov0e3t/28/

.border{ bordeR: 1px solid red; overflow: hidden;}
点赞