当前位置:网站首页>PHP short video source code, thumb animation will float when you like it

PHP short video source code, thumb animation will float when you like it

2022-07-04 22:18:00 Cloudleopard network technology

php Short video source , There will be thumb animation floating when you like

(function() {
    
    var coreSocialistValues 
      , index = Math.floor(Math.random() * coreSocialistValues.length);
    document.body.addEventListener('click', function(e) {
    
        if (e.target.tagName == 'A') {
     return; }
        var x = e.pageX
          , y = e.pageY
          , span = document.createElement('span');
        span.textContent = coreSocialistValues[index];
        index = (index + 1) % coreSocialistValues.length;// Mold taking cycle 
        span.style.cssText = ['z-index: 9999999; position: absolute; font-weight: bold; color: #ff6651; top: ', y - 20, 'px; left: ', x, 'px;'].join(''); document.body.appendChild(span); animate(span); });
    function animate(el) {
    // Animation  var i = 0 , top = parseInt(el.style.top) , id = setInterval(frame, 16.7); function frame() {// frame  if (i > 180) { clearInterval(id); el.parentNode.removeChild(el); } else { i += 2; el.style.top = top - i + 'px'; el.style.opacity = (180 - i) / 180; } } }
}());

That's all php Short video source , There will be thumb animation floating when you like , More content welcome to follow the article

原网站

版权声明
本文为[Cloudleopard network technology]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/185/202207042146456434.html