我有这段代码,我正在使用我的个人投资组合,但它的这样一个痛苦的更新和tbh看看以及.我想知道,如果有人可以简化这段代码保持相同的效果.任何帮助是非常感谢.
<section class="space-y-5 py-10">
<h2 class="text-3xl font-bold text-center">Timeline</h2>
<div>
<div class="flex space-x-2 sm:space-x-4">
<div class="flex flex-col items-center justify-center">
<p>2022</p>
<div class="border-color h-full w-px border-l border-skin-base">
</div>
</div>
<div class="flex flex-col space-y-5 pb-5">
<p>
Developed full-stack MERN application while a part of{" "}
<a
href="https://www.joincolab.io/"
class="text-skin-accent hover:underline"
>
Co.Lab</a
>
</p>
<p>
Graduated from{" "}
<a
class="text-skin-accent hover:underline"
href="https://www.dominican.edu/"
>
Dominican University of California
</a>{" "}
with a bachelor's degree in computer science
</p>
<p>
Started Volunteering with CodeNation to help students learn web
development
</p>
</div>
</div>
<div class="flex space-x-2 sm:space-x-4">
<div class="flex flex-col items-center justify-center">
<p>2020</p>
<div class="border-color h-full w-px border-l border-skin-base">
</div>
</div>
<div class="flex flex-col space-y-5 pb-5">
<p>Graduated from Berkeley High School</p>
<p>
Completed{" "}
<a
class="text-skin-accent hover:underline"
href="https://codenation.org/"
>
Code Nation
</a>{" "}
Pandora program
</p>
<p>
Participant of{" "}
<a
class="text-skin-accent hover:underline"
href="https://buildyourfuture.withgoogle.com/programs/computer-science-summer-institute"
>
Google's Computer Science Summer Institute
</a>
</p>
</div>
</div>
<div class="flex space-x-2 sm:space-x-4">
<div class="flex flex-col items-center justify-center">
<p>2019</p>
<div class="border-color h-full w-px border-l border-skin-base">
</div>
</div>
<div class="flex flex-col space-y-5 pb-5">
<p>
Joined my High School's Robotics Club{" "}
<a
class="text-skin-accent hover:underline"
href="https://team5419.org/"
>
Team 5419 Berkelium
</a>
</p>
</div>
</div>
<div class="flex space-x-2 sm:space-x-4">
<div class="flex flex-col items-center justify-center">
<p>2018</p>
<div class="border-color h-full w-px border-l border-skin-base">
</div>
</div>
<div class="flex flex-col">
<p>Wrote my first line of code</p>
</div>
</div>
</div>
</section>
正如你所看到的,这是一个巨大的代码树,有很多工作要做。
2条答案
按热度按时间ruoxqz4g1#
下面是使用普通CSS的相同代码。试试这个代码...
dffbzjpn2#
这里是一个代码片段,以及一个顺风发挥我将如何结构它。一些样式可能不一样,但如果你最终使用这个结构,我有信心,你能够添加任何风格,你需要的。
https://play.tailwindcss.com/s1S4P9JxHB