简体   繁体   English

如何使用引导程序偏移下划线?

[英]How do I offset underline using bootstrap?

I'm trying to place to place a text underline without using CSS.我试图在不使用 CSS 的情况下放置文本下划线。 I've used <p><u>text</u></p> and class="text-decoration-underline"> , but neither seem to have an option to offset so that the text sits a few px lower than default.我使用过<p><u>text</u></p>class="text-decoration-underline"> ,但似乎都没有偏移选项,因此文本比默认。

Only other method I've seen is class="list-group list-group-flush"> but it takes the length of the entire page.我见过的唯一其他方法是class="list-group list-group-flush">但它占用了整个页面的长度。

You could use the border and padding (pb-1, pb-2, etc...) utility classes...您可以使用边框和填充(pb-1、pb-2 等...)实用程序类...

 <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous"> <p class="m-5"> <span class="border-bottom pb-1">text with underline</span> and other text </p>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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