<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Posts on meowody</title><link>https://meowody.com/blog/posts/</link><description>Recent content in Posts on meowody</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Sat, 04 Apr 2026 13:35:01 +0800</lastBuildDate><atom:link href="https://meowody.com/blog/posts/index.xml" rel="self" type="application/rss+xml"/><item><title>Assign Js to Css</title><link>https://meowody.com/blog/posts/assign-js-to-css/</link><pubDate>Sat, 04 Apr 2026 13:35:01 +0800</pubDate><guid>https://meowody.com/blog/posts/assign-js-to-css/</guid><description>&lt;h1 id="assigning-javascript-variables-for-use-in-css"&gt;Assigning JavaScript Variables for Use in CSS&lt;/h1&gt;
&lt;h2 id="way-1-native-dom-methods"&gt;Way 1: Native DOM Methods&lt;/h2&gt;
&lt;p&gt;Using native DOM methods to modify CSS styles, for example:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-javascript" data-lang="javascript"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;property&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Within this &lt;code&gt;new style&lt;/code&gt; block, you can utilize variables passed in from JavaScript.&lt;/p&gt;
&lt;p&gt;While this approach certainly works, it becomes rather cumbersome when dealing with more complex CSS modifications—such as animations. In such scenarios, the method described below proves to be far more essential.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="way-2-css-variable"&gt;Way 2: CSS Variable&lt;/h2&gt;
&lt;p&gt;The approach involves utilizing CSS variables: assign the value of a JavaScript variable to a CSS variable, and then use that CSS variable within your CSS styles.&lt;/p&gt;</description></item><item><title>Coordinates on a Circle</title><link>https://meowody.com/blog/posts/calc-circle-point-coordinates/</link><pubDate>Sat, 21 Mar 2026 17:11:28 +0800</pubDate><guid>https://meowody.com/blog/posts/calc-circle-point-coordinates/</guid><description>&lt;h1 id="find-the-coordinates-of-a-point-on-a-circle"&gt;Find the coordinates of a point on a circle.&lt;/h1&gt;
&lt;p&gt;Calculating the coordinates of a point on a circle typically depends on the information you already know (such as the angle, the position of the circle&amp;rsquo;s center, etc.). The most commonly used method involves &lt;strong&gt;trigonometric functions&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://meowody.com/blog/posts/calc-circle-point-coordinates/calc-en.jpg" alt="calc-coor" style="max-width: 100%; height: auto; display:block; margin: 0 auto; border: 1px solid var(--glass-border); border-radius: .5rem;" /&gt;&lt;/p&gt;
&lt;h2 id="standard-circle-centered-at-the-origin"&gt;Standard Circle (Centered at the Origin)&lt;/h2&gt;
&lt;p&gt;If the center of the circle is located at the origin $(0, 0)$ of the coordinate system, the radius is $r$, and the angle between the point and the positive direction of the $x$-axis is $\theta$, then the coordinates $(x, y)$ of that point are:&lt;/p&gt;</description></item></channel></rss>