css3边框线倾斜,使用CSS3倾斜边框的Div?

我已经从我身边试图可能这是帮助你。

HTML

CSS

.container{

width:600px;

height:400px;

border:1px solid red;

overflow:hidden;

white-space:nowrap;

}

.imageWrap{

width:300px;

display:inline-block;

height:500px;

position:relative;

width:400px;

vertical-align:top;

margin-left:-70px;

}

.imageWrap.ro{

border-right:5px solid red;

-webkit-transform:rotate(15deg);

-moz-transform:rotate(15deg);

transform:rotate(15deg);

overflow:hidden;

z-index:1;

margin-left:-100px;

margin-top:-80px;

}

.pic{

background:url('http://lorempixel.com/output/nightlife-q-c-746-711-9.jpg');

-webkit-transform:rotate(-15deg);

-moz-transform:rotate(-15deg);

transform:rotate(-15deg);

width:640px;

height:640px;

position:absolute;

left:-50px;

}

.pic2{

width:400px;

height:400px;

background:url('http://lorempixel.com/output/sports-h-c-609-626-7.jpg');

}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值