I'm struggling to transform the following code snippet to use Tailwind css but without success so far.
Original code:
<li>
<Link to="/test">abc</Link>
</li>
css:
ol li:not(:last-child)::after {
color: red;
margin: 0 10px;
content: '/';
}
Is there a way to get rid of the css file and put all those rules in tailwind? The part with that content, /
, seems impossible.
You can use the class after:content-['/']
<li>
<a
class="after:content-['/'] after:inline"
href="/test">abc
</a>
</li>
https://play.tailwindcss.com/ztw0UhpFpg
Source: https://dev.to/j471n/how-to-use-before-and-after-in-tailwind-css-1he
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.