<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:wfw="http://wellformedweb.org/CommentAPI/">
<channel>
<title>拾光 - 代码</title>
<link>https://www.ishiguang.cn/tag/%E4%BB%A3%E7%A0%81/</link>
<atom:link href="https://www.ishiguang.cn/feed/tag/%E4%BB%A3%E7%A0%81/" rel="self" type="application/rss+xml" />
<language>zh-CN</language>
<description></description>
<lastBuildDate>Thu, 04 Sep 2025 15:05:00 +0800</lastBuildDate>
<pubDate>Thu, 04 Sep 2025 15:05:00 +0800</pubDate>
<item>
<title>给网站加上飘雪效果</title>
<link>https://www.ishiguang.cn/21781.html</link>
<guid>https://www.ishiguang.cn/21781.html</guid>
<pubDate>Thu, 04 Sep 2025 15:05:00 +0800</pubDate>
<dc:creator>ssr</dc:creator>
<description><![CDATA[文章包含隐藏内容，请进入文章内页查看~]]></description>
<content:encoded xml:lang="zh-CN"><![CDATA[
文章包含隐藏内容，请进入文章内页查看~
]]></content:encoded>
<slash:comments>0</slash:comments>
<comments>https://www.ishiguang.cn/21781.html#comments</comments>
<wfw:commentRss>https://www.ishiguang.cn/feed/tag/%E4%BB%A3%E7%A0%81/</wfw:commentRss>
</item>
<item>
<title>雪花飘落特效</title>
<link>https://www.ishiguang.cn/16531.html</link>
<guid>https://www.ishiguang.cn/16531.html</guid>
<pubDate>Tue, 30 Aug 2022 17:06:00 +0800</pubDate>
<dc:creator>admin</dc:creator>
<description><![CDATA[雪花飘落特效只需要简单加载一个JS 不需要复杂的去加载CSS。或者别的直接上代码  把这个放进头部就可以了  /// &lt;reference path=&quot;jquery-1.10.2...]]></description>
<content:encoded xml:lang="zh-CN"><![CDATA[
<p>雪花飘落特效</p><p>只需要简单加载一个JS 不需要复杂的去加载CSS。或者别的</p><p>直接上代码  把这个放进头部就可以了</p><pre><code>  /// &lt;reference path=&quot;jquery-1.10.2.min.js&quot; /&gt;
  ///
  ///
  var minSize = 5;
  var maxSize = 20;
  var newOn = 280;
  var flake = $(&quot;&lt;div&gt;&lt;/div&gt;&quot;).css({ &quot;position&quot;: &quot;absolute&quot;, &quot;top&quot;: &quot;-50px&quot; }).html(&quot;❅&quot;);
  $(function () {


    var documentHeight = $(document).height();
    var documentWidth = $(document).width();
    setInterval(function () {
    var startPositionLeft = Math.random() * documentWidth;
    var sizeFlake = minSize + Math.random() * maxSize;
    var endPositionLeft = Math.random() * documentWidth;
    var durationFall = documentHeight * 15 + Math.random() * 3000;
    var startOpacity = 0.7 + 0.3 * Math.random();
    var endOpacity = 1.5 * Math.random();
    flake.clone().appendTo($(&quot;body&quot;)).css({
        &quot;left&quot;: startPositionLeft,
        &quot;opacity&quot;: startOpacity,
        &quot;font-size&quot;: sizeFlake,
        &quot;color&quot;: &quot;#aadff1&quot;
    }).animate({
        &quot;top&quot;: documentHeight - 40,
        &quot;left&quot;: endPositionLeft,
        &quot;opacity&quot;: endOpacity
    }, durationFall, function () {
        $(this).remove();
    });
    }, newOn);
    });
</code></pre><p>记得加载jquery  如果有加载就不需要再加载了！</p><p>效果如下</p><p><img src="https://up.ishiguang.cn/blog/typecho/84207-ves0q3oofq8_20220830050607.png?imageMogr2/format/webp" alt="84207-ves0q3oofq8_20220830050607.png" title="84207-ves0q3oofq8_20220830050607.png"></p>
]]></content:encoded>
<slash:comments>0</slash:comments>
<comments>https://www.ishiguang.cn/16531.html#comments</comments>
<wfw:commentRss>https://www.ishiguang.cn/feed/tag/%E4%BB%A3%E7%A0%81/</wfw:commentRss>
</item>
</channel>
</rss>