<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sebastián Ayora</title>
    <description>The latest articles on DEV Community by Sebastián Ayora (@sebastin_ayora).</description>
    <link>https://dev.to/sebastin_ayora</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4236047%2F31327b86-7111-4a82-8dc5-47f308c68cb8.jpg</url>
      <title>DEV Community: Sebastián Ayora</title>
      <link>https://dev.to/sebastin_ayora</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sebastin_ayora"/>
    <language>en</language>
    <item>
      <title>How I built a responsive landing page with animated cards in HTML, CSS and JavaScript</title>
      <dc:creator>Sebastián Ayora</dc:creator>
      <pubDate>Mon, 09 Nov 2026 23:55:48 +0000</pubDate>
      <link>https://dev.to/sebastin_ayora/how-i-built-a-responsive-landing-page-with-animated-cards-in-html-css-and-javascript-3a8</link>
      <guid>https://dev.to/sebastin_ayora/how-i-built-a-responsive-landing-page-with-animated-cards-in-html-css-and-javascript-3a8</guid>
      <description>&lt;p&gt;I wanted to practice building a landing page from scratch without a template, so I made a dark-themed sports page with tilted cards, a responsive navigation bar, and simple hover animations. Here is how I put it together.&lt;/p&gt;

&lt;p&gt;The goal&lt;/p&gt;

&lt;p&gt;The page needed three sections, each with a title, a short description, and a call-to-action button. The main challenge was making the cards look dynamic on desktop without breaking the layout on phones.&lt;/p&gt;

&lt;p&gt;Structure&lt;/p&gt;

&lt;p&gt;I kept the HTML simple: a header with navigation, a main section with a grid of cards, and a footer. Each card is a div with a heading, a short paragraph, and a button.&lt;/p&gt;

&lt;p&gt;html&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;h2&amp;gt;Train in the gym&amp;lt;/h2&amp;gt;
&amp;lt;p&amp;gt;Strength, volume and definition routines for every level.&amp;lt;/p&amp;gt;
&amp;lt;a href="#"&amp;gt;View routines&amp;lt;/a&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Responsive layout&lt;/p&gt;

&lt;p&gt;I used CSS Grid for the cards, so they stack on small screens and sit side by side on larger ones:&lt;/p&gt;

&lt;p&gt;css&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.cards&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;grid&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;grid-template-columns&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;repeat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;auto-fit&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;minmax&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;250px&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1fr&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;gap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Hover animation with JavaScript&lt;/p&gt;

&lt;p&gt;For the interactive part, I used a small script that adds a class when the mouse enters a card. The CSS handles the actual movement, which keeps the JavaScript light:&lt;/p&gt;

&lt;p&gt;javascript&lt;/p&gt;

&lt;p&gt;&lt;code&gt;document.querySelectorAll('.card').forEach(card =&amp;gt; {&lt;br&gt;
  card.addEventListener('mouseenter', () =&amp;gt; card.classList.add('active'));&lt;br&gt;
  card.addEventListener('mouseleave', () =&amp;gt; card.classList.remove('active'));&lt;br&gt;
});&lt;/code&gt;&lt;br&gt;
What I learned&lt;/p&gt;

&lt;p&gt;Keeping the CSS and JavaScript separate made the page easier to debug. Animations feel better when they are subtle, and responsive design is easier to test if you check the layout at each breakpoint while you build, not at the end.&lt;/p&gt;

&lt;p&gt;I also offer landing pages and simple interactive websites as a freelancer. If you need one for your business or community, you can see my services here: &lt;a href="https://www.fiverr.com/s/2pQdqBq" rel="noopener noreferrer"&gt;https://www.fiverr.com/s/2pQdqBq&lt;/a&gt;&lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
