楼主: 凡哥

[碎语] 源码小屋

[复制链接]
一生安柠 青恬时光 幸福莓满 心想事橙 桃气满满 梅开颜笑 心若葡提 大吉大荔 樱果相依 喜上莓梢 一坛酒
 楼主| 发表于 2024-6-28 17:57 | 显示全部楼层
花简静 发表于 2024-6-27 20:34
非常漂亮。。养眼之极

感谢支持
点评
回复

使用道具

一生安柠 青恬时光 幸福莓满 心想事橙 桃气满满 梅开颜笑 心若葡提 大吉大荔 樱果相依 喜上莓梢 一坛酒
 楼主| 发表于 2024-6-28 17:57 | 显示全部楼层
花简静 发表于 2024-6-27 20:33
这贴子效果真是太绝了。
变幻的光影有电影大片的效果

果酱果酱
点评
回复

使用道具

一生安柠 青恬时光 幸福莓满 心想事橙 桃气满满 梅开颜笑 心若葡提 大吉大荔 樱果相依 喜上莓梢 一坛酒
 楼主| 发表于 2024-6-28 17:58 | 显示全部楼层
花简静 发表于 2024-6-27 20:32
好哒,给老师来个水煮三鲜。。

当早餐不错
点评
回复

使用道具

一生安柠 青恬时光 幸福莓满 心想事橙 桃气满满 梅开颜笑 心若葡提 大吉大荔 樱果相依 喜上莓梢 一坛酒
 楼主| 发表于 2024-6-28 18:12 | 显示全部楼层
本帖最后由 凡哥 于 2024-6-28 18:14 编辑

2024年6月28日 星期五

魂引

<style> #mydiv { --width: 1024px; margin: 30px 0 30px calc(50% - (var(--width) / 2 + 90px)); width: var(--width); height: 640px; background: #eee url('https://638183.freep.cn/638183/t24/webp/hyyb.webp') no-repeat center/cover; box-shadow: 2px 2px 8px rgba(0,0,0,.7); overflow: hidden; z-index: 1; position: relative;} .ball { position: absolute; width: 40px; height: 40px; background: linear-gradient(plum, teal); border-radius: 50%; opacity: .95; transition: width .5s, height .5s, opacity .5s; cursor: pointer; offset-path: path('M40 20 Q512 1080,984 20'); offset-distance: 0; animation: 6s linear forwards;} .ball:hover { width: 45px; height: 45px; opacity: .75; } .ball:nth-of-type(1) { left: -20px; top: 0; animation-name: move1-1;} .ball:nth-of-type(2) { left: 20px; top: 0; background: linear-gradient(tan, cyan); offset-distance: 50%;} #vid { position: absolute; width: 80%; height: 50%; transform: scale(-1,1) rotate(30deg); object-fit: cover; mix-blend-mode: multiply; pointer-events: none; } @keyframes move1-1 {     from { offset-distance: 0%; transform: rotate(720deg); filter: hue-rotate(0); }     to { offset-distance: 50%; transform: rotate(0); filter: hue-rotate(360deg); } } @keyframes move1-2 {     from { offset-distance: 50%; transform: rotate(0); filter: hue-rotate(360deg); }     to { offset-distance: 0%; transform: rotate(720deg); filter: hue-rotate(0); } } @keyframes move2-1 {     from { offset-distance: 50%; transform: rotate(720deg); filter: hue-rotate(0deg); }     to { offset-distance: 100%; transform: rotate(0); filter: hue-rotate(360deg); } } @keyframes move2-2 {     from { offset-distance: 100%; transform: rotate(0); filter: hue-rotate(360deg); }     to { offset-distance: 50%; transform: rotate(720deg); filter: hue-rotate(0); } } </style>   <div id="mydiv">     <audio id="aud" src="https://music.163.com/song/media/outer/url?id=29999267" autoplay loop></audio>     <video id="vid" src="https://img.tukuppt.com/video_show/2269348/00/17/44/5ec494a494d82.mp4" autoplay loop muted></video>     <div id="b1" class="ball"></div>     <div id="b2" class="ball"></div> </div>   <script> //小球数组 const balls = [b1, b2]; //小球1动画结束 b1.onanimationend = () => {     let ani = window.getComputedStyle(b1).getPropertyValue('animation-name');     if(ani === 'move1-1') {         b1.style.animationName = '';         b2.style.animationName = 'move2-1';     }else{         b1.style.animationName = 'move1-1';     } }; //小球2动画结束 b2.onanimationend = () => {     let ani = window.getComputedStyle(b2).getPropertyValue('animation-name');     if(ani === 'move2-1') {         b2.style.animationName = 'move2-2';     }else{         b2.style.animationName = '';         b1.style.animationName = 'move1-2';     } }; //联动控制函数 var mState = () => {     balls.forEach(b => {         b.style.animationPlayState = aud.paused ? 'paused' : 'running';         b.title = ['暂停','播放'][+aud.paused];     });     aud.paused ? vid.pause() : vid.play(); }; //音频控件监听事件 aud.oncanplay = aud.onplaying = aud.onpause = () => mState(); //小球点击事件 balls.forEach(b => b.onclick = () => aud.paused ? aud.play() : aud.pause()); //加载全屏插件 var sF = document.createElement('script'); sF.src = 'https://638183.freep.cn/638183/web/api/fullscreen.js'; sF.charset = 'utf-8'; document.querySelector('body').appendChild(sF); sF.onload = () => FS({     papa: '#mydiv',     css: 'bottom: 10px; left: 50%; transform: translate(-50%); --color: snow; --fsBg: transparent;', }); //动画响应窗体变化 window.onresize = () => balls.forEach(b => {     b.style.offsetPath = `path('M40 20 Q${mydiv.offsetWidth / 2} ${mydiv.offsetHeight * 2 - 200}, ${mydiv.offsetWidth - 40} 20')`;     b.style.animationDuration = ((mydiv.offsetWidth + mydiv.offsetHeight) / (1024 + 640)) * 6 + 's'; }); </script>
点评
回复

使用道具

一叶知秋 版主勋章 山高为峰 山外有山 樱果相依 24 46 47 48 闲花落
发表于 2024-6-28 23:13 | 显示全部楼层

这个是很 讲究的早餐
点评
回复

使用道具

一叶知秋 版主勋章 山高为峰 山外有山 樱果相依 24 46 47 48 闲花落
发表于 2024-6-28 23:14 | 显示全部楼层

还有煎蛋和面包
点评
回复

使用道具

一生安柠 青恬时光 幸福莓满 心想事橙 桃气满满 梅开颜笑 心若葡提 大吉大荔 樱果相依 喜上莓梢 一坛酒
 楼主| 发表于 2024-6-29 21:38 | 显示全部楼层

齐全了
点评
回复

使用道具

一生安柠 青恬时光 幸福莓满 心想事橙 桃气满满 梅开颜笑 心若葡提 大吉大荔 樱果相依 喜上莓梢 一坛酒
 楼主| 发表于 2024-6-29 21:40 | 显示全部楼层

2024年6月29日 星期六

长相思

<style>     #papa { --width: 1000px; margin: 120px 0 20px calc(50% - (var(--width) / 2 + 90px)); width: var(--width); height: 562px; background: url('https://638183.freep.cn/638183/t24/3/ihxlsi.jpg') no-repeat center/cover; box-shadow: 3px 3px 8px #666; user-select: none; z-index: 1; position: relative; }     #papa::before { position: absolute; content: url('https://638183.freep.cn/638183/small/hf.webp'); mix-blend-mode: lighten; filter: blur(1px); }     #txtbox { position: absolute; left: 20px; top: 20px; width: 300px; min-height: 60px; padding: 10px 20px; box-sizing: border-box; overflow: hidden; }     #txtbox p { position: relative; margin: 4px 0; padding: 0; font: normal 24px/26px sans-serif; color: cyan; txtAr-shadow: 1px 1px 1px gray; animation: 2s forwards; }     #player { position: absolute; width: 120px; right: 60px; bottom: 100px; cursor: pointer; animation: rot 6s linear infinite; }     #vid { position: absolute; width: 100%; height: 80%; object-fit: cover; mix-blend-mode: screen; opacity: 0.5; pointer-events: none; }     .tMid, .tRight { display: inline-block; width: 100%; }     .tMid { text-align: center; }     .tRight { text-align: right; font-size: 18px; }     @keyframes move { to { transform: translate(0); } }     @keyframes rot { to { transform: rotate(360deg); } } </style>   <div id="papa">     <audio id="aud" src="https://music.163.com/song/media/outer/url?id=1467202239" autoplay loop></audio>     <video id="vid" src="https://img.tukuppt.com/video_show/2402760/00/01/67/5b483eab6f0a1.mp4" muted autoplay loop></video>     <div id="txtbox"></div>     <img id="player" alt="" src="https://638183.freep.cn/638183/t23/btn/meihua_133482968750383750.png" title"播放/暂停" /> </div>   <script> var txtAr = [     `<span class="tMid"><strong>长相思</strong>(其一)</span><br><br>\n长相思,在长安。\n络纬秋啼金井阑,\n微霜凄凄簟色寒。\n孤灯不明思欲绝,\n卷帷望月空长叹。\n美人如花隔云端。\n上有青冥之高天,\n下有渌水之波澜。\n天长路远魂飞苦,\n梦魂不到关山难。\n长相思,摧心肝。\n<span class="tRight">——[唐]李白</span>`,     `<span class="tMid"><strong>长相思</strong>(其二)</span><br><br>\n日色欲尽花含烟,\n月明欲素愁不眠。\n赵瑟初停凤凰柱,\n蜀琴欲奏鸳鸯弦。\n此曲有意无人传,\n愿随春风寄燕然。\n忆君迢迢隔青天。\n昔时横波目,\n今作流泪泉。\n不信妾肠断,\n归来看取明镜前。\n<span class="tRight">——[唐]李白</span>` ]; var curIdx = 0; var paras = []; var ww = txtbox.offsetWidth;   var addPs = () => {     var txtstr = txtAr[curIdx];     txtbox.innerHTML = '';     paras.length = 0;     var ar = txtstr.split(/\n/).filter(item => item !=='');     ar.forEach((p,k) => {         var para = document.createElement('p');         para.innerHTML = p;         para.style.cssText += `transform: translate(${ww}px);`;         txtbox.appendChild(para);         paras.push(para);     });     curIdx = (curIdx + 1) % txtAr.length;     mkAni(); };   var parasReset = () => {     addPs();     paras.forEach(p => {         p.style.animationName = '';         p.style.transform = 'translate(${ww}px)';         setTimeout( () => { paras[0].style.animationName = 'move'; }, 500);     }); };   var mkAni = () => {     paras.forEach((p,k) => {         p.onanimationend = () => {             paras[(k+1) % paras.length].style.animationName = 'move';             if(k === paras.length - 1) setTimeout( () => parasReset(), 10000);         };     }); };   var mState = () => {     [...paras,...[player]].forEach(p => p.style.animationPlayState = aud.paused ? 'paused' : 'running');     aud.paused ?vid.pause() : vid.play();     player.title = ['暂停', '播放'][+aud.paused]; };   aud.oncanplay = aud.onplaying = aud.onpause = () => mState(); player.onclick = () => aud.paused ? aud.play() : aud.pause();   addPs(); paras[0].style.animationName = 'move';   </script>

评分

1

查看全部评分

点评
回复

使用道具

一生安柠 青恬时光 幸福莓满 心想事橙 桃气满满 梅开颜笑 心若葡提 大吉大荔 樱果相依 喜上莓梢 一坛酒
 楼主| 发表于 2024-6-29 21:41 | 显示全部楼层
花简静 发表于 2024-6-28 23:13
这个是很 讲究的早餐

口感、营养一样不落
点评
回复

使用道具

一叶知秋 版主勋章 山高为峰 山外有山 樱果相依 24 46 47 48 闲花落
发表于 2024-6-29 22:35 | 显示全部楼层
凡哥 发表于 2024-6-29 21:41
口感、营养一样不落

完美,明天 照抄一份
点评
回复

使用道具

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|千山论坛

GMT+8, 2024-9-20 00:32

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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