简体   繁体   English

悬停时的 CSS 效果(虚线下划线 + 更改文本颜色)

[英]CSS effect on hover (dashed underline + change of text color)

I'm totoal CSS noob我完全是 CSS 菜鸟

Can you please take a minute and help me create dashed underline (with gap) with text color change on mouse hover?你能花点时间帮我创建虚线下划线(带间隙),鼠标悬停时文本颜色会发生变化吗?

I would really appreciate your help!我真的很感激你的帮助!

http://i.imgur.com/2JjFYWT.jpg http://i.imgur.com/2JjFYWT.jpg
http://codepen.io/anon/pen/lIjDp (please, dont mind some unneccessary CSS code there) http://codepen.io/anon/pen/lIjDp (请不要介意那里有一些不必要的 CSS 代码)

THANKS A TON!非常感谢!

Try:尝试:

#zed h1:hover{
    border-bottom:5px dashed yellow;
    color:orange;
}

DEMO here.演示在这里。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM