用html让一条直线旋转,CSS3可以实现 三根线条 旋转成一个箭头吗,或者用其他办法?求大佬指导...

参考一楼代码,稍微加点动画渐变,代码如下。html>

.arrow {

width: 65px;

height: 50px;

background: #000;

padding: 30px 0 0 30px;

margin:30px auto 0;

position: relative;

}

.arrow i {

display: block;

width: 50px;

height: 5px;

background: #fff;

position: absolute;

border-radius: 10px 0 0 10px;

transition:all 300ms;

}

.arrow i:nth-of-type(1) {

width: 35px;

top:20px;

}

.arrow i:nth-of-type(2) {

width: 35px;

top:35px;

}

.arrow i:nth-of-type(3) {

width: 35px;

top:50px;

}

.arrow:hover i{

border-radius: 0;

height: 3px;

}

.arrow:hover i:nth-of-type(1){

top:35px;

transform-origin: left center;

transform: rotate(-45deg);

}

.arrow:hover i:nth-of-type(2){

width: 55px;

margin-left:-1px;

border-radius: 10px 0 0 10px;

}

.arrow:hover i:nth-of-type(3){

top:35px;

transform-origin: left center;

transform: rotate(45deg);

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值