简体   繁体   中英

How to align icon next to text of link attribute with tailwind-css and css.gg

This is 100% a duplicated but I cannot get the icon left to the text of the <a> -attribute.

The closest I got is with this solution:

 <script src="https://cdn.tailwindcss.com"></script> <link href='https://css.gg/mail.css' rel='stylesheet'> <a href="mailto:mail@mail.mail"><i class="gg-mail float-left mr-1 top-1"></i>MAIL@MAIL.MAIL</a>

why does this solution not work in my project? Is it because of the css.gg?

https://stackoverflow.com/a/27969559/3832357

Nevermind I solved it with flex! But any other solutions would be appreciated!

 <script src="https://cdn.tailwindcss.com"></script> <link href='https://css.gg/mail.css' rel='stylesheet'> <a class="flex items-center" href="mailto:mail@mail.mail"><i class="gg-mail mr-1"></i>MAIL@MAIL.MAIL</a>

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM