Home  >  Q&A  >  body text

javascript - The effect of a lottery (as shown in the picture)?


An effect of random rotation of each avatar picture. Does anyone have a similar demo or provide a method? Thank you for your help

阿神阿神2717 days ago669

reply all(2)I'll reply

  • phpcn_u1582

    phpcn_u15822017-06-05 11:12:32

    http://skill-map.stuq.org/ Refer to this picture and you should add some js code to meet the needs.

    reply
    0
  • 習慣沉默

    習慣沉默2017-06-05 11:12:32

    Use the rotate attribute of css3 to rotate the angle Math.random(), set a setInterval to increase the angle of rotation, and turn off the timer after a certain period of time. At this time, the lottery is calculated based on the angle at which the picture stops.

    reply
    0
  • Cancelreply