英文:
Create lines for list elements
问题
如何用CSS或Tailwind实现这样的UI?这是一个侧边栏,但列表项有弯曲的线进入它们。
这是我确切意思的图像:
英文:
how can I do like this UI with css or tailwind?
It is a sidebar but the list items have curved lines going into them.
Here's an image of what I mean exactly:
答案1
得分: 1
以下是翻译的内容:
<script src="https://cdn.tailwindcss.com"></script>
<div class="relative bg-blue-700 text-white max-w-[16rem] p-4 pl-8">
<div class="absolute left-4 top-4 h-6 border-l-2 border-b-2 w-4 rounded-bl-lg"></div>
<div class="px-4 py-3 bg-white/20 rounded-xl">
管理项目
</div>
<div class="absolute left-4 top-4 h-[4.5rem] border-l-2 border-b-2 w-4 rounded-bl-lg"></div>
<div class="px-4 py-3">
管理类别
</div>
</div>
英文:
Here is an approach in this Tailwind Play
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-html -->
<script src="https://cdn.tailwindcss.com"></script>
<div class="relative bg-blue-700 text-white max-w-[16rem] p-4 pl-8">
<div class="absolute left-4 top-4 h-6 border-l-2 border-b-2 w-4 rounded-bl-lg"></div>
<div class="px-4 py-3 bg-white/20 rounded-xl">
Manage Items
</div>
<div class="absolute left-4 top-4 h-[4.5rem] border-l-2 border-b-2 w-4 rounded-bl-lg"></div>
<div class="px-4 py-3">
Manage Categories
</div>
</div>
<!-- end snippet -->
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论