css - How can I prevent Thymeleaf auto hyperlink formatting? - Stack Overflow

admin2025-04-18  2

I'm making a Thymeleaf template and for the field creatorName, if it is an email such as "[email protected]" it should be rendered in white text just as any other value would be. Instead, Thymeleaf is automatically applying the blue coloring, underline, text-decoration, and pointer-event as if it were a link (normally it would be).

How can I disable this automatic styling?

<p>Ticket Creator: <span th:text="${creatorName}" style="color: white !important; -webkit-text-fill-color: white; text-decoration: none !important; pointer-events: none; cursor: default;"></span></p>

I have tried applying inline styling with !important tags, verbose to the point of webkit-text-fill-color, as above, but nothing has affected the default blue styling.

Example link formatting:

转载请注明原文地址:http://anycun.com/QandA/1744957718a90023.html