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. P2272 [ZJOI2007]最大半连通子图

    思路 tarjan的题目 注意是要选出一个点集而不是边集 第一问就是缩点之后最长链,第二问就是有多少个最长链,注意缩点后连边要去重(不然一个链的方案可能会被统计多次) 代码 #include < ...

  2. springmvc通过ajax异步请求返回json格式数据

    jsp 首先创建index.jsp页面 <script type="text/javascript"> $(function () { $("#usernam ...

  3. BZOJ 4584 【APIO2016】 赛艇

    题目链接:赛艇 讲道理好好的Boat为啥要翻译成赛艇呢……题面中不也是划艇么…… 这道题考虑一下dp.由于划艇数量过于庞大,所以肯定不能直接记录到dp状态中.所以一个想法就是把数量离散化,然后把每个学 ...

  4. Codeforces Round #420 (Div. 2) E. Okabe and El Psy Kongroo 矩阵快速幂优化dp

    E. Okabe and El Psy Kongroo time limit per test 2 seconds memory limit per test 256 megabytes input ...

  5. 跳跳虎回家(国庆10.1模拟赛T2)

    题目: [题目描述] 跳跳虎在外面出去玩忘了时间,现在他需要在最短的时间内赶回家. 跳跳虎所在的世界可以抽象成一个含有 n 个点的图(点编号从 1 到 n ),跳跳虎现在在 1 号点,跳跳虎的家在 n ...

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

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

  7. python 比较两个yaml文件

    import yaml with open("a.yaml") as f: with open("a.yaml") as k: ): x=f.readline( ...

  8. AQS是什么?

    AQS介绍 AQS,即AbstractQueuedSynchronizer, 队列同步器,它是Java并发用来构建锁和其他同步组件的基础框架.来看下同步组件对AQS的使用: AQS是一个抽象类,主是是 ...

  9. Ado.net之存储过程的使用【三】

    重点是红色标记区域的代码,设置本次执行的是存储过程,如果不设置,默认操作的是sql语句 private void LoadData() { string constr = @"databas ...

  10. R语言 平滑连接

    参考自 153分钟 使用平滑曲线,沿着X轴从左向右的顺序依次连接,可以使用spline样条函数线. x = 1:5 y = c(1,3,4,2.5,2) plot(x,y) sp = spline(x ...