1.  css3

  

    ul{
                width: 200px;
                height: 200px;
                background-color:black;
                border-radius: 50%;
                position: relative;
      margin: 100px;
            }
            li{
                width: 20px;
                height: 20px;
                position: absolute;
                background-color:red;
                border-radius: 50%;
                line-height: 40px;
                text-align: center;
                left: 50%;
                margin-left: -10px;
                margin-top: -10px;
      font-size: 12px;
            }
            li:nth-of-type(2){
                transform: rotate(36deg);
                transform-origin:10px 110px;
            }
            li:nth-of-type(3){
                transform: rotate(72deg);
                transform-origin:10px 110px;
            }
            li:nth-of-type(4){
                transform: rotate(108deg);
                transform-origin:10px 110px;
            }
            li:nth-of-type(5){
                transform: rotate(144deg);
                transform-origin:10px 110px;
            }
            li:nth-of-type(6){
                transform: rotate(180deg);
                transform-origin:10px 110px;
            }
            li:nth-of-type(7){
                transform: rotate(216deg);
                transform-origin:10px 110px;
            }
            li:nth-of-type(8){
                transform: rotate(252deg);
                transform-origin:10px 110px;
            }
            li:nth-of-type(9){
                transform: rotate(288deg);
                transform-origin:10px 110px;
            }
            li:nth-of-type(10){
                transform: rotate(324deg);
                transform-origin:10px 110px;
            }
    <ul>
      <li>1</li>
      <li>2</li>
      <li>3</li>
      <li>4</li>
      <li>5</li>
      <li>6</li>
      <li>7</li>
      <li>8</li>
      <li>9</li>
      <li>10</li>
    </ul>
 
 
 
 
2. js计算+position定位实现
 
  *{ margin: 0; padding: 0;}
  .modepayment-content{
    width: 300px;
    height: 300px;
    background: red;
    border-radius: 100%;
    position: relative;
    left: 300px;
    top: 300px;
  }
  .modepayment-content div{
    position: absolute;
  }
 
 
  <div class="modepayment-content">
    <div class="modepayment-wx">微信</div>
    <div class="modepayment-zfb">支付宝</div>
    <div class="modepayment-xj">现金</div>
    <div class="modepayment-hyk">会员卡</div>
    <div class="modepayment-yl">银联</div>
    <div class="modepayment-hh">混合</div>
    <div class="modepayment-gd">更多</div>
    <div class="modepayment-hh">混合</div>
    <div class="modepayment-gd">更多</div>
    <div class="modepayment-hh">混合</div>
    <div class="modepayment-gd">更多</div>
  </div>
 
  

 
  $(function(){
    var radius =180;
    var avd = 360/$(".modepayment-content div").length;
    var ahd = avd*Math.PI/180;
    $(".modepayment-content").css({"left":800,"top":200});
    $(".modepayment-content div").each(function(index, element){
      $(this).css({"bottom": Math.sin((ahd*index))*radius+140,"right":Math.cos((ahd*index))*radius+135});
    });
  })
 
 
  

div成圆形分布的更多相关文章

  1. (Android)处理图片成圆形

    Android将一张Bitmap处理成圆形是十分常见的,经常见的场合就是作为用户头像,我们可以Canvas来辅助实现这个功能,代码如下 public static Bitmap toRoundCorn ...

  2. Glide的加载图片的帮助类,用来把图片圆角或者改成圆形图片

    Glide虽然非常好用但是没找到把图片圆角的方法,所以百度了一个非常不错的加载类自己实现圆角图 感谢原文章作者:http://blog.csdn.net/weidongjian/article/det ...

  3. 不涉及框架纯java实现将图片裁成圆形

    package com.wtsrui.utils;import java.awt.Color;  import sun.misc.BASE64Encoder;import java.awt.Graph ...

  4. 微信小程序裁剪图片成圆形

    代码地址如下:http://www.demodashi.com/demo/14453.html 前言 最近在开发小程序,产品经理提了一个需求,要求微信小程序换头像,用户剪裁图片必须是圆形,也在gith ...

  5. WPF 中使用附加属性,将任意 UI 元素或控件裁剪成圆形(椭圆)

    不知从什么时候开始,头像流行使用圆形了,于是各个平台开始追逐显示圆形裁剪图像的技术.WPF 作为一个优秀的 UI 框架,当然有其内建的机制支持这种圆形裁剪. 不过,内建的机制仅支持画刷,而如果被裁剪的 ...

  6. 微信小程序之裁剪图片成圆形

    前言 最近在开发小程序,产品经理提了一个需求,要求微信小程序换头像,用户剪裁图片必须是圆形,也在github上看了一些例子,一般剪裁图片用的都是方形,所以自己打算写一个小组件,可以把图片剪裁成圆形,主 ...

  7. android 开发 View _15 导入一张图片将它裁剪成圆形 与 paint图层叠加处理详解

    方法一: /* 实现思维是这样的: 1.首先拿到bitmap图片 2.得到bitmap图片的高度 宽度,并且计算好各个画图尺寸 3.创建一个空白的 bitmap图片: Bitmap output = ...

  8. 将UIImage转换成圆形图片image

    建议写成UIImage分类,如下: .h //变成圆形图片 - (UIImage *)circleImage; .m //变成圆形图片 - (UIImage *)circleImage { // NO ...

  9. GDI+ 如何将图片绘制成圆形的图片

    大概意思就是不生成新的图片,而是将图片转换为圆形图片. 实现代码如下: private Image CutEllipse(Image img, Rectangle rec, Size size) { ...

随机推荐

  1. Ubuntu14.04下 升级 cmake

    参考: How to install cmake 3.2 on ubuntu 14.04? Ubuntu14.04下升级cmake 1.通过PPA安装: $ sudo apt-get install ...

  2. vue.js精讲01

    笔记及源码地址 : https://github.com/wll8/vue_note 01 2017-09-13 view一个 mvvm框架(库),和 ag 类似.比较小巧,容易上手. mvc: mv ...

  3. Javascript 日期格式化 相关操作

    1.相关扩展函数 //--------------------------------------------------- // 判断闰年 //--------------------------- ...

  4. 51nod 1405 树的距离之和(dfs)

    http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1405 题意: 思路: 先求出所有点到根节点的距离,需要维护每棵子树的大小 ...

  5. Linux命令之rz命令与sz命令

    1.rz命令 rz命令(Receive ZMODEM),使用ZMODEM协议,将本地文件批量上传到远程Linux/Unix服务器,注意不能上传文件夹. 当我们使用虚拟终端软件,如Xshell.Secu ...

  6. 彻底弄懂JS事件委托的概念和作用

    一.写在前头    接到某厂电话问什么是事件代理的时候,一开始说addEventListener,然后他说直接绑定新的元素不会报dom不存在的错误吗?然后我就混乱了,我印象中这个方法是可以绑定新节点的 ...

  7. C# 用面向对象的思想去编程

    再接上一篇博文,之前写的两篇博文虽然实现了功能,但是和控件之间的粘性太大,依赖于控件进行操作,所以这篇博文主要用面向对象的思想做一个Demo,将逻辑层与显示层剥离开 首先新建一个窗体文件,搭建界面完毕 ...

  8. P1330 封锁阳光大学

    传送门 思路: 依题意可知,在图中的每一条边有且只有一个点被选中(阻止老曹刷街),那么就可以对其采取二分图染色,一条边中:一个点为黑色,另一个点为白色:如果一条边中的两个端点的颜色相同,则说明无解,输 ...

  9. Error: Program type already present: okhttp3.Authenticator$1

    在app中的build.gradle中加入如下代码, configurations { all*.exclude group: 'com.google.code.gson' all*.exclude ...

  10. ROC与AUC原理

    来自:https://blog.csdn.net/shenxiaoming77/article/details/72627882 来自:https://blog.csdn.net/u010705209 ...