找回密码
 立即注册
搜索
热搜: 活动 交友 discuz

江山如画

[复制链接]

27

主题

886

回帖

5731

积分

天山茗客

积分
5731
 楼主| 发表于 昨天 07:38 | 显示全部楼层 IP:湖北
娟子 发表于 2024-11-19 19:12
欣赏老师音画佳作!好美山水图片,歌曲也非常好听,点赞!问好!

谢谢您的支持, 早上好!

27

主题

886

回帖

5731

积分

天山茗客

积分
5731
 楼主| 发表于 昨天 07:38 | 显示全部楼层 IP:湖北
风清 发表于 2024-11-19 19:22
欣赏学习老师精彩佳作,大气壮观!歌曲优美,为您点赞!
晚上好!

谢谢您的支持欣赏, 早上好!

27

主题

886

回帖

5731

积分

天山茗客

积分
5731
 楼主| 发表于 昨天 07:39 | 显示全部楼层 IP:湖北
筱亭 发表于 2024-11-20 03:22
欣赏学习了!可以向老师求代码吗?

谢谢您的支持欣赏, 早上好!

只要是我知道的都行。

296

主题

2万

回帖

9万

积分

版主

积分
95735
发表于 昨天 11:05 来自手机 | 显示全部楼层 IP:山东
起个网名好难 发表于 2024-11-20 07:39
谢谢您的支持欣赏, 早上好!

只要是我知道的都行。

谢谢老师!就这个帖子的代码吧。再次感谢

27

主题

886

回帖

5731

积分

天山茗客

积分
5731
 楼主| 发表于 昨天 13:26 | 显示全部楼层 IP:湖北
筱亭 发表于 2024-11-20 11:05
谢谢老师!就这个帖子的代码吧。再次感谢



  1. <meta name="referrer" content="never" />
  2. <meta charset="utf-8">
  3. <style>
  4. @import url('https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css');

  5. :root{--rState:running;--w:650px;--h:975px;}
  6. #outBlk{position:relative;width:var(--w);height:var(--h);background:#000000 url([img]https://pic.imgdb.cn/item/65bf0270871b83018a3ad9aa.jpg[/img])no-repeat center / cover;overflow:hidden;90px;margin:16px auto;box-shadow:4px 4px 10px #000;}
  7. zxx-slide{width:var(--w);height:var(--h);position:absolute;}
  8. .zxx-slide-a{position:absolute;cursor:default;pointer-events:none;z-index:0; animation-duration:2s;animation-name: ;transition:1s;animation-play-state:paused;}
  9. .zxx-slide-img{width:var(--w);height:var(--h);}

  10. #player{position:absolute;right:20px;bottom:10px;width:80px;height:80px;cursor:pointer;z-index:100;animation: pRot 8s linear infinite var(--rState);}
  11. @keyframes pRot        { to { transform: rotate(360deg); } }

  12. </style>
  13. <div id="outBlk">
  14.         <zxx-slide></zxx-slide>
  15.        
  16.                 <svg viewbox="0 0 300 300" id="player">
  17.                         <radialGra**nt id="rg" r="0.8">
  18.                           <stop offset="0" stop-color="pink"></stop>
  19.                           <stop offset=".3" stop-color="AquaMarine"></stop>
  20.                           <stop offset="1" stop-color="blue"></stop>
  21.                         </radialGra**nt>
  22.                   <path d="M150 150
  23.                         A 60 30 0 0 0 295 150
  24.                         A 60 30 0 1 0 150 150
  25.                         A 60 30 40 0 0 261.08 243.20
  26.                         A 60 30 40 1 0 150 150
  27.                         A 60 30 80 0 0 175.18 292.80
  28.                         A 60 30 80 1 0 150 150
  29.                         A 60 30 120 0 0 77.50 275.57
  30.                         A 60 30 120 1 0 150 150
  31.                         A 60 30 160 0 0 13.74 199.59
  32.                         A 60 30 160 1 0 150 150
  33.                         A 60 30 200 0 0 13.74 100.41
  34.                         A 60 30 200 1 0 150 150
  35.                         A 60 30 240 0 0 77.50 24.43
  36.                         A 60 30 240 1 0 150 150
  37.                         A 60 30 280 0 0 175.18 7.20
  38.                         A 60 30 280 1 0 150 150
  39.                         A 60 30 320 0 0 261.08 56.80
  40.                         A 60 30 320 1 0 150 150" fill="url(#rg)" fill-rule="evenodd"></path>
  41.                 </svg>
  42.        
  43.         <audio src="https://music.163.com/song/media/outer/url?id=419485457.mp3" loop autoplay id="mObj" />
  44. </div>

  45. <script>
  46. {
  47.         let aniActNames = ["bounce","flash","pulse","rubberBand","shakeX","shakeY","headShake","swing","tada","wobble","jello","heartBeat","backInDown","backInLeft","backInRight","backInUp","backOutDown","backOutLeft","backOutRight","backOutUp","bounceIn","bounceInDown","bounceInLeft","bounceInRight","bounceInUp","bounceOut","bounceOutDown","bounceOutLeft","bounceOutRight","bounceOutUp","fadeIn","fadeInDown","fadeInDownBig","fadeInLeft","fadeInLeftBig","fadeInRight","fadeInRightBig","fadeInUp","fadeInUpBig","fadeInTopLeft","fadeInTopRight","fadeInBottomLeft","fadeInBottomRight","fadeOut","fadeOutDown","fadeOutDownBig","fadeOutLeft","fadeOutLeftBig","fadeOutRight","fadeOutRightBig","fadeOutUp","fadeOutUpBig","fadeOutTopLeft","fadeOutTopRight","fadeOutBottomRight","fadeOutBottomLeft","flip","flipInX","flipInY","flipOutX","flipOutY","lightSpeedInRight","lightSpeedInLeft","lightSpeedOutRight","lightSpeedOutLeft","rotateIn","rotateInDownLeft","rotateInDownRight","rotateInUpLeft","rotateInUpRight","rotateOut","rotateOutDownLeft","rotateOutDownRight","rotateOutUpLeft","rotateOutUpRight","hinge","jackInTheBox","rollIn","rollOut","zoomIn","zoomInDown","zoomInLeft","zoomInRight","zoomInUp","zoomOut","zoomOutDown","zoomOutLeft","zoomOutRight","zoomOutUp","slideInDown","slideInLeft","slideInRight","slideInUp","slideOutDown","slideOutLeft","slideOutRight","slideOutUp"];

  48. let pics = [
  49. "https://mmbiz.qpic.cn/sz_mmbiz_jpg/ZyAxVN9OeK6XFwEYZBPwvYOlRjf0ZZ003cicP9u62jouHDoY0E2ntcGiakKDECLLPm2HYpQuDdQVA8ZIxaAFjIoA/640",
  50. "https://mmbiz.qpic.cn/sz_mmbiz_jpg/ZyAxVN9OeK6XFwEYZBPwvYOlRjf0ZZ00l0ROpQmGDMSjcJvGmeNLKWgTPxuOy9Q4Bic6VuHgBWX7ssIm3Izbvrw/640",
  51. "https://mmbiz.qpic.cn/sz_mmbiz_jpg/ZyAxVN9OeK6XFwEYZBPwvYOlRjf0ZZ00tF0ibb2vv4wQCl4BLjKmGRMIiaVtVTZzMod1ic6CZwVicmnL38RgEJvYHg/640",
  52. "https://mmbiz.qpic.cn/sz_mmbiz_jpg/ZyAxVN9OeK6XFwEYZBPwvYOlRjf0ZZ00**iaMPbY11YvouBJ18yA1MgeClqlkicDyDaLmZWCqWvJrXeWUxF53jQ/640",
  53. "https://mmbiz.qpic.cn/sz_mmbiz_jpg/ZyAxVN9OeK6XFwEYZBPwvYOlRjf0ZZ00IcGANjfe0GK5Xgp0PwYjTFiaIPN8UMa7zcYFicpbc86wr1dib3xETvG1g/640",
  54. "https://mmbiz.qpic.cn/sz_mmbiz_jpg/ZyAxVN9OeK6XFwEYZBPwvYOlRjf0ZZ00bUAQRMIJanNlE6GuHWvCBVlOpKypOGl2TicicVB1ibfuTb2AeFHhomDKA/640",
  55. "https://mmbiz.qpic.cn/sz_mmbiz_jpg/ZyAxVN9OeK6XFwEYZBPwvYOlRjf0ZZ00tyqpfb4DrWJMdsdUDyoPFiczfUrAQSOKES28vUsPtTicY248cDt5vUdw/640",
  56. "https://mmbiz.qpic.cn/sz_mmbiz_jpg/ZyAxVN9OeK6XFwEYZBPwvYOlRjf0ZZ00Zz5dqOFqdN3e3LPy68w0ohCOXWyKLDTnoaDMtAIbI6WcJKgOlibTmqg/640",
  57. "https://mmbiz.qpic.cn/sz_mmbiz_jpg/ZyAxVN9OeK6XFwEYZBPwvYOlRjf0ZZ006R5rm4eBV63QDjvScRU6b0U1gL4ibeRQtVAFibA5eBGg67iblcWGoaLQQ/640",
  58. "https://mmbiz.qpic.cn/sz_mmbiz_jpg/ZyAxVN9OeK6XFwEYZBPwvYOlRjf0ZZ0095Gl4YW9iaYXXnIicysfGeicwDIUbpGno3xvjRG5UTvsn4ZbQEtPicKMbw/640",
  59. "https://mmbiz.qpic.cn/sz_mmbiz_jpg/ZyAxVN9OeK6XFwEYZBPwvYOlRjf0ZZ00z8cxI5MUhVoPckwwId2KgXVYpiaHPb8Kia858RvG7bOCbPyrAxwnhH1g/640",
  60. "https://mmbiz.qpic.cn/sz_mmbiz_jpg/ZyAxVN9OeK6XFwEYZBPwvYOlRjf0ZZ00FC1usEDZmfV6G2kicF0YicqYOWs175ScLZACBxbofAqTxofQeoBdo8Og/640",
  61. "https://mmbiz.qpic.cn/sz_mmbiz_jpg/ZyAxVN9OeK6XFwEYZBPwvYOlRjf0ZZ00lxp75wWibrR4pdlfEu1wNNjPyscvmhTUd4WsBCZNTdDU9lRpd5ubWKA/640",
  62. "https://mmbiz.qpic.cn/sz_mmbiz_jpg/ZyAxVN9OeK6XFwEYZBPwvYOlRjf0ZZ00IwqxxxqvqDPTicfBFazvrYZ4tlCrC8vovo0Snj1HlW71wvdP77p2eXA/640",
  63. "https://mmbiz.qpic.cn/sz_mmbiz_jpg/ZyAxVN9OeK6XFwEYZBPwvYOlRjf0ZZ00DKX**dutRHQGNz30NOont5KzamoqAlegCZIy09N9HHYqolnHnZz5Q/640",
  64. "https://mmbiz.qpic.cn/sz_mmbiz_jpg/ZyAxVN9OeK6XFwEYZBPwvYOlRjf0ZZ00HmdubJSuNasGUpBkQicQBVykX2GANvDicBrVjEen1tOxoZcoiaaa7j5Aw/640",
  65. "https://mmbiz.qpic.cn/sz_mmbiz_jpg/ZyAxVN9OeK6XFwEYZBPwvYOlRjf0ZZ00F4Bz7I6CoWCTWoXHfmw0Ve3UdcDpC99bwXCIQsiaXCo0Xdb8eVb6bsw/640",
  66. "https://mmbiz.qpic.cn/sz_mmbiz_jpg/ZyAxVN9OeK6XFwEYZBPwvYOlRjf0ZZ00obrmGWiakvO4OtrH7Bvh74Ou9uIvYrzzLTWujBrNNQcETpHy2NewJhg/640",
  67. "https://mmbiz.qpic.cn/sz_mmbiz_jpg/ZyAxVN9OeK6XFwEYZBPwvYOlRjf0ZZ00jNhSkOkWUu02aFEUeicZ13M51Xn9BU0AoVQdqMicvKaLXicg7AzVNIN9w/640",
  68. "https://mmbiz.qpic.cn/sz_mmbiz_jpg/ZyAxVN9OeK6XFwEYZBPwvYOlRjf0ZZ00L2RwDwS3psBvHL7PeumXxUevGWYiaiajjxnOT78l07qW5ONNnvXf4RuA/640",
  69. "https://mmbiz.qpic.cn/sz_mmbiz_jpg/ZyAxVN9OeK6XFwEYZBPwvYOlRjf0ZZ00jQ8ib7SNMr3fWibve6yekk3ut6Wut3xV3Z18Poub4qnz7wur06XLKnkA/640",
  70. "https://mmbiz.qpic.cn/sz_mmbiz_jpg/ZyAxVN9OeK6XFwEYZBPwvYOlRjf0ZZ00Ik3zHojCErVYic6xcOiaHYZicQ7SaZKxTm1QcftCJbTLWzqjUV8f8dY6Q/640",
  71. "https://mmbiz.qpic.cn/sz_mmbiz_jpg/ZyAxVN9OeK6XFwEYZBPwvYOlRjf0ZZ00h9ETRjgWIibNC7SQs998oLRu9ibnXKAYbwAksglsPiar2l7R3lRbI8XnQ/640",
  72. "https://mmbiz.qpic.cn/sz_mmbiz_jpg/ZyAxVN9OeK6XFwEYZBPwvYOlRjf0ZZ00TYI0yJFzBibnsJbpR5mSXHWjVWHw7rBXtYVTpTBZXexLn9tDkzxxRcA/640",
  73. "https://mmbiz.qpic.cn/sz_mmbiz_jpg/ZyAxVN9OeK6XFwEYZBPwvYOlRjf0ZZ00BR1EK3qibHjQOBHriapU1qRUicLtyksBfju6YXxtwlOyLpk1TD1kq5x9Q/640",
  74. "https://mmbiz.qpic.cn/sz_mmbiz_jpg/ZyAxVN9OeK6XFwEYZBPwvYOlRjf0ZZ00vWwicOuRRK2osIrhWxu1aKfjiaPQ1QZK1roKicF4Wtjc8jUS4bP3V5sPQ/640",
  75. "https://mmbiz.qpic.cn/sz_mmbiz_jpg/ZyAxVN9OeK6XFwEYZBPwvYOlRjf0ZZ00gUPXgibB03t9P6srQUkKhqt6JqY2W1icicZGfb4g0FdrqIkiaIwdJosfGw/640",
  76. "https://mmbiz.qpic.cn/sz_mmbiz_jpg/ZyAxVN9OeK6XFwEYZBPwvYOlRjf0ZZ00kFVicxOkwsfibcb84iayIqFTPnejM27TMCanU9UBUYINGuicU89udbbGibA/640",
  77. "https://mmbiz.qpic.cn/sz_mmbiz_jpg/ZyAxVN9OeK6XFwEYZBPwvYOlRjf0ZZ00VWY5FWFeqZfdh2xSzjZoNY7n7cZTjoMQbnGP1GYASam1S4iaB97U1Ww/640",
  78. "https://mmbiz.qpic.cn/sz_mmbiz_jpg/ZyAxVN9OeK6XFwEYZBPwvYOlRjf0ZZ00ibIl22zN6uItIYCWz31AQLF9JHEf2uqngauLB23GmLjJ45FibJVzFgyg/640",
  79. "https://mmbiz.qpic.cn/sz_mmbiz_jpg/ZyAxVN9OeK6XFwEYZBPwvYOlRjf0ZZ00GqfLZruym6O7Pa4mX9s38D6kDDFfwZkkrrD4Arj8lP3JgoMJAJKsiaQ/640",
  80. "https://mmbiz.qpic.cn/sz_mmbiz_jpg/ZyAxVN9OeK6XFwEYZBPwvYOlRjf0ZZ00lCzqwsEibfstmSowCVqrqmRMygBPQlKtIZqBibpt2d6sE0D7tBNs81yQ/640",
  81. "https://mmbiz.qpic.cn/sz_mmbiz_jpg/ZyAxVN9OeK6XFwEYZBPwvYOlRjf0ZZ004ddfcJAkd9kEsuGUribiaFqpCDZzibpP4WZDyJ79zZicos1libT8USvQBmA/640",
  82. ];
  83. let eleZxxSlides = document.querySelectorAll('zxx-slide');
  84. pics.forEach(pic => {
  85.         let aObj = document.createElement('a');
  86.         aObj.className = 'zxx-slide-a';
  87.         let imgObj = document.createElement('img');
  88.         imgObj.src = pic;
  89.         imgObj.className = 'zxx-slide-img';
  90.         aObj.appendChild(imgObj);
  91.         eleZxxSlides[0].appendChild(aObj);
  92. });
  93.   [].slice.call(eleZxxSlides).forEach(function(container) {
  94.     let timerSlide = null;
  95.     let indexSlide = 0;
  96.     // 对应的元素
  97.     let eleSlides = [].slice.call(container.querySelectorAll('a'));
  98.     let eleButtons = [].slice.call(container.querySelectorAll('button'));
  99.     let funSlide = function() {
  100.       eleSlides.forEach(function(slide, index) {
  101.         if (!mObj.paused) {
  102.           if (indexSlide == index) {
  103.                           slide.style.zIndex = 1;
  104.                           slide.style.animationName = aniActNames[parseInt(Math.random() * aniActNames.length)];
  105.                           slide.style.animationPlayState = 'running'
  106.           } else {
  107.                           slide.style.zIndex = 0;
  108.                           slide.style.animationName = '';
  109.                           slide.style.animationPlayState = 'paused'
  110.           }
  111.         }
  112.       });
  113.       timerSlide = setTimeout(function() {
  114.         indexSlide++;
  115.         if (indexSlide == eleSlides.length) {
  116.           indexSlide = 0;
  117.         }
  118.         funSlide();
  119.       }, 12000);
  120.     }
  121.     indexSlide++;
  122.     setTimeout(funSlide, 12000);
  123.   });
  124.   let runState = () => {
  125.         mObj.paused
  126.                 ?        (mObj.pause(), player.style.setProperty('--rState','paused'))
  127.                 :        (mObj.play(), player.style.setProperty('--rState','running'));
  128.   }
  129.   mObj.onplaying = mObj.onpause = () => runState();
  130.   player.onclick = () => {mObj.paused ? mObj.play() : mObj.pause();}
  131.   mObj.play().catch(_ => runState());
  132. }
  133. </script>
复制代码


296

主题

2万

回帖

9万

积分

版主

积分
95735
发表于 13 小时前 | 显示全部楼层 IP:山东

谢谢老师!收藏待用了
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|离退休论坛 ( 浙B2-20100176 )

GMT+8, 2024-11-21 17:02 , Processed in 0.096299 second(s), 19 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表