html边框双箭头,CSS常用样式之绘制双箭头代码示例

本篇文章小编给大家分享一下CSS常用样式之绘制双箭头代码示例,文章代码介绍的很详细,小编觉得挺不错的,现在分享给大家供大家参考,有需要的小伙伴们可以来看看。

一、多次调用单箭头

实现了单箭头–就很容易实现双箭头了,这次以边框旋转为例多次调用实现双箭头。

1、边框旋转单箭头实现

.arrow-right{

height: 120px;

width: 30px;

display :inline-block;

position: relative;

}

.arrow-right::after {

content: "";

height: 60px;

width: 60px;

top: 12px;

border-width: 8px 8px 0 0;

border-color: blue;

border-style: solid;

transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);

position: absolute;

}

效果图如下:

a51bbb6e98fb5e90e1d09578015fe61d.png

2、多次调用单箭头

效果图如下:

3e190f6f084c8cd97dda3577125f164f.png

二、旋转边框直接绘制双箭头

之前通过::after伪元素绘制单箭头,现在再加上::before伪元素再绘制一个单箭头就实现纯CSS绘制双箭头了。

.arrow-right{

height: 120px;

width: 30px;

display :inline-block;

position: relative;

}

.arrow-right::before {

content: "";

height: 60px;

width: 60px;

top: 12px;

left: 30px;

border-width: 8px 8px 0 0;

border-color: blue;

border-style: solid;

transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);

position: absolute;

}

.arrow-right::after {

content: "";

height: 60px;

width: 60px;

top: 12px;

border-width: 8px 8px 0 0;

border-color: blue;

border-style: solid;

transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);

position: absolute;

}

效果图如下:

65910e1ca9efb9aa4885123844de536b.png

双三角覆盖这种方式也能直接绘制双箭头,但是实现比较麻烦,不如边框旋转方式好实现就不讲了

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值