英文:
I want to change the Underline for a Dot, a single dot using CSS HTML
问题
我想要将下划线改成一个点,一个单独的点,也就是说,当光标悬停在“Home”上时,会出现一个点,对于每个选项,如“Movies”、“Music”等也是如此。请使用 #CSS #HTML。
英文:
I want to change the Underline for a Dot, a single Dot, that is, when the cursor is over "Home" a Dot appears and so for each Option such as "Movies" "Music" .. etc Please #CSS #HTML
答案1
得分: 1
如果我理解问题正确,这是你的起始点:
<a href="#">电影</a>
英文:
If I understand the question correctly, this is your starting point:
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-css -->
a {
display: inline-block;
position: relative;
padding-bottom: 8px;
text-decoration: none;
color: inherit;
}
a:hover:after {
transition-delay: .2s;
}
a:hover:before {
transition-delay: 0s;
}
a:hover:before {
transform: scaleX(0);
}
a:hover:after {
transform: scale(1);
}
a:before,
a:after {
content: '';
position: absolute;
background-color: currentColor;
}
a:before {
inset: auto 0 3px;
height: 1px;
transition: transform .2s .2s;
}
a:after {
width: 6px;
height: 6px;
inset: auto calc(50% - 3px) 0;
transition: transform .2s;
transform: scale(0);
border-radius: 50%;
}
<!-- language: lang-html -->
<a href="#">Movies</a>
<!-- end snippet -->
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论