<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Javascript on LOØF</title><link>https://loof.ca/tags/javascript/</link><description>Recent content in Javascript on LOØF</description><generator>Hugo</generator><language>zh</language><atom:link href="https://loof.ca/tags/javascript/index.xml" rel="self" type="application/rss+xml"/><item><title>生命游戏</title><link>https://loof.ca/projects/life-game/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://loof.ca/projects/life-game/</guid><description>&lt;div id="project-content"&gt;
 &lt;div id="grid"&gt;&lt;/div&gt;
 &lt;div id="controlPanel"&gt;
 &lt;button id="controlBtn"&gt;开始&lt;/button&gt;
 &lt;button id="reset"&gt;清空&lt;/button&gt;
 &lt;/div&gt;
 &lt;p id="gameState"&gt;
 使用说明：1. 请点击网格来设置生命的起始分布 2. 点击开始
 &lt;/p&gt;
&lt;/div&gt;
&lt;style&gt;

#project-content {
 margin: 50px auto;
}

#controlPanel {
 display: flex;
 justify-content: center;
 margin: 10px auto;
}

#controlPanel &gt; * {
 margin: 10px;
 background-color: inherit;
 border: solid medium #a14639;

 font-size: 15px;
}

#controlPanel #controlBtn:hover, #reset:hover {
 background-color: #eca4a9;
}


#grid {
 margin: 10px auto;
}

.cell {
 height: 15px;
 width: 15px;
 display: inline-block;
 box-sizing: border-box;
 border: 0.1px lightblue solid;

 transition-delay: 0.1s;
 transition: background-color 0.2s;
}

.cell:hover {
 cursor: pointer;
 border: solid thin lightcoral;
}

&lt;/style&gt;</description></item></channel></rss>