css绘制三角形 四个方向分离

 

 

  <div class="right-top-all">

            <div class="play-video">
                //上
                <div class="paly-top">
                  <div class="icon-top"></div>
                </div>

                //右
                <div class="paly-right">
                  <div class="icon-right"></div>
                </div>

                //下
                <div class="play-bottom">
                  <div class="icon-bottom"></div>
                </div>

                //左
                <div class="paly-left">
                  <div class="icon-left"></div>
                </div>

                //中间图片
                <div class="play-conter">
                  <img src="../../../assets/videoIcon/PTZ.png" alt="" />
                </div>
            </div>
</div>

    
    .right-top {
      position: relative;
      height: 250px;
      margin-bottom: 20px;
      margin-right: 20px;
      background: #363b45;
      border-color: #363b45;
      color: #fff;
      .right-top-all {
        position: absolute;
        top: 10%;
        left: 40%;
     
        // 绘制播放三角形
        .play-video {
          width: 200px;
          height: 200px;
          position: relative;
          top: 20%;

            // 上
          .paly-top {
            width: 35px;
            height: 35px;
            position: relative;
            border: 1px solid #278fcf;
            border-radius: 5px;
            background-color: #dbecfe;
            left: 20%;
            .icon-top {
              position: absolute;
              top: 32%;
              left: 28%;
              width: 0px;
              height: 0px;
              border-bottom: #1988cc 8px solid;   //样式
              border-left: transparent 7px solid;
              border-right: transparent 7px solid;
            }
          }
        // 右
          .paly-right {
            width: 35px;
            height: 35px;
            position: relative;
            border: 1px solid #278fcf;
            border-radius: 5px;
            background-color: #dbecfe;
            top: 3%;
            left: 42%;
            .icon-right {
              position: absolute;
              top: 32%;
              left: 45%;
              width: 0px;
              height: 0px;
              border-top: transparent 7px solid;
              border-bottom: transparent 7px solid;
              border-left: #1988cc 8px solid;   //样式
              border-right: transparent 7px solid;
            }
          }
            // 下
          .play-bottom {
            width: 35px;
            height: 35px;
            position: relative;
            border: 1px solid #278fcf;
            border-radius: 5px;
            background-color: #dbecfe;
            top: 5%;
            left: 20%;
            .icon-bottom {
              position: absolute;
              top: 20%;
              left: 28%;
              width: 0px;
              height: 0px;
              border-top: transparent 7px solid;
              border-bottom: #1988cc 8px solid; //样式
              border-left: transparent 7px solid;
              border-right: transparent 7px solid;
            }
          }
        // 左
          .paly-left {
            width: 35px;
            height: 35px;
            position: relative;
            border: 1px solid #278fcf;
            border-radius: 5px;
            background-color: #dbecfe;
            top: -32%;
            left: -2%;
            .icon-left {
              position: absolute;
              top: 32%;
              left: 15%;
              width: 0px;
              height: 0px;
              border-top: transparent 7px solid;
              border-bottom: transparent 7px solid;
              border-left: transparent 7px solid;
              border-right: #1988cc 8px solid;   //样式
            }
          }
         
        }
      }

     
    }

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值