最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Trying to chance my link style

programmeradmin0浏览0评论

I'm trying to edit the style of my hyperlink to be underlined like it currently is, but have a bit more space between the word and the underline.

Is this possible?

/

I'm trying to edit the style of my hyperlink to be underlined like it currently is, but have a bit more space between the word and the underline.

Is this possible?

https://stridedigital/

Share Improve this question asked Sep 30, 2019 at 19:32 Jake WardJake Ward 1
Add a comment  | 

1 Answer 1

Reset to default 0

This is done with CSS. You must use "border-bottom" property instead of "text-decoration: underline;" so you can have more flexibility with the line.

a {
    text-decoration: none; /* remove the default underline; */
    border-bottom: 1px solid blue; /* Set the border width and color. */
    padding-bottom: 3px; /* Set the distance between the word and the line */
}

Using border-bottom you can also have transitions which has a nice visual effect.

a {color: blue; border-bottom: 2px solid blue;
    -webkit-transition:all 0.3s;
    -moz-transition:all 0.3s;
    -o-transition:all 0.3s;
    transition:all 0.3s;
}

a:hover {color: blue; border-bottom: 2px solid red;}

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论