2021-04-15

最近需要做了一个云台控制的样式 大概效果输入下:

在这里插入图片描述
所需要的图标是这样式儿的: (网上找了好几篇文章没有图标 特别是icon.png是正三角形)
在这里插入图片描述
图片可以在这里下载:https://www.iconfont.cn/(阿里巴巴矢量图标库)

感觉自己找图标比较麻烦的话就可以直接到这里下载我的demo
地址:https://download.csdn.net/download/laolu123456789/16682318

具体test.html代码如下:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>八方向云台控制器</title>
  <style>
  
 
.pie {
	position: relative;
	/* margin: 20px auto; */
	padding: 0;
	width: 324px;
    height: 324px;
	border-radius: 50%;
	list-style: none;
  overflow: hidden;
  background:url('bg.png') no-repeat center center / 100% 100%;
}
.center{
    position: absolute;
    width: 120px;
    height: 120px;
    top: 102px;
    left: 102px;
    border-radius: 50%;
    background: url('paly.png') no-repeat center center / 60% 60%;
 
}
.pie2{
    position: absolute;
    margin: 20px auto;
    left: 35px;
    
}
.slice {
	overflow: hidden;
	position: absolute;
	top: 0; 
  right: 0;
	width: 50%;
  height: 50%;
	transform-origin: 0% 100%; 
}
.slice-one {
  transform: rotate(-22.5deg) skewY(-45deg);
  
}
.slice-one img{
    transform: skewY(45deg) rotate(22.5deg);
    margin-top: 100px;
    margin-left: 30px;
}
.slice-two {
  transform: rotate(22.5deg) skewY(-45deg);
  
}
.slice-two img{
    transform: skewY(45deg) rotate(22.5deg);
    margin-top: 100px;
    margin-left: 30px;
}
.slice-three {
  transform: rotate(67.5deg) skewY(-45deg);
  
}
.slice-three img{
    transform: skewY(45deg) rotate(22.5deg);
    margin-top: 100px;
    margin-left: 30px;
}
.slice-four {
  transform: rotate(112.5deg) skewY(-45deg);
  
}
.slice-four img{
    transform: skewY(45deg) rotate(22.5deg);
    margin-top: 100px;
    margin-left: 30px;
}
.slice-five {
  transform: rotate(157.5deg) skewY(-45deg);
  
}
.slice-five img{
    transform: skewY(45deg) rotate(22.5deg);
    margin-top: 100px;
    margin-left: 30px;
}
.slice-six {
  transform: rotate(202.5deg) skewY(-45deg);
  
}
.slice-six img{
    transform: skewY(45deg) rotate(22.5deg);
    margin-top: 100px;
    margin-left: 30px;
}
.slice-seven {
  transform: rotate(247.5deg) skewY(-45deg);
  
}
.slice-seven img{
    transform: skewY(45deg) rotate(22.5deg);
    margin-top: 100px;
    margin-left: 30px;
}
.slice-eight {
  transform: rotate(292.5deg) skewY(-45deg);
  
}
.slice-eight img{
    transform: skewY(45deg) rotate(22.5deg);
    margin-top: 100px;
    margin-left: 30px;
}
  </style>
</head>
<body>
 
<div class='pie'>
    <li class='slice-one slice'><img style="height: 30px;" src="icon.png" alt=""></li> 
    <li class='slice-two slice'> <img style="height: 30px;" src="icon.png" alt=""></li>
    <li class='slice-three slice'> <img style="height: 30px;" src="icon.png" alt=""></li>
    <li class='slice-four slice'> <img style="height: 30px;" src="icon.png" alt=""></li>
    <li class='slice-five slice'><img style="height: 30px;" src="icon.png" alt=""> </li>
    <li class='slice-six slice'> <img style="height: 30px;" src="icon.png" alt=""></li>
    <li class='slice-seven slice'><img style="height: 30px;" src="icon.png" alt=""> </li>
    <li class='slice-eight slice'> <img style="height: 30px;" src="icon.png" alt=""></li>
    <div class="center"></div>
</div>
<div class='pie2'>
    <div> 
        <img style="height: 50px; margin: 0  50px  0  0;" src="scene+.png" alt="">
        <img style="height: 50px; margin: 0  50px  0  0;" src="focal+.png" alt="">
        <img style="height: 50px; margin: 0  0  0  0;" src="aperture-.png" alt="">
    </div>
    <div> 
        <img style="height: 50px; margin: 0  50px  0  0;" src="scene-.png" alt="">
        <img style="height: 50px; margin: 0  50px  0  0;" src="focal-.png" alt="">
        <img style="height: 50px; margin: 0  0  0  0;" src="aperture+.png" alt="">
    </div>
</div>
 
</body>
</html>

最后参考地址是:https://blog.csdn.net/m0_46538057/article/details/110039599#comments_15910648

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值