Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[html] 第358天 给一个元素加下划线的方法有哪些? #2204

Open
haizhilin2013 opened this issue Apr 7, 2020 · 1 comment
Open
Labels
html html

Comments

@haizhilin2013
Copy link
Collaborator

第358天 给一个元素加下划线的方法有哪些?

我也要出题

@haizhilin2013 haizhilin2013 added the html html label Apr 7, 2020
@a298003154
Copy link

a298003154 commented Apr 8, 2020

  1. 使用 <u></u> 标签
  2. 给元素添加 boder-bottom
  3. 文字样式 text-decoration: underline;
  4. 使用伪类或者子元素做绝对定位
.target {
  position: relative;
}
.underline {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background-color: black;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
html html
Projects
None yet
Development

No branches or pull requests

2 participants