如何给 html 文本加下划线,使文本下面的线是虚线而不是标准的下划线?最好,我想在不使用单独的 CSS 文件的情况下执行此操作。我是 html 的新手。
最佳答案
没有 CSS 是不可能的。事实上,<u>
标签只是添加 text-decoration:underline
到带有浏览器内置 CSS 的文本。
以下是您可以执行的操作:
<html>
<head>
<!-- Other head stuff here, like title or meta -->
<style type="text/css">
u {
border-bottom: 1px dotted #000;
text-decoration: none;
}
</style>
</head>
<!-- Body, content here -->
</html>
关于html - 如何在 HTML 文本下方添加虚线下划线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15252597/