为什么有些css样式不起作用

网站建设 2021-07-03 08:42www.dzhlxh.cn网站建设
以下好像就是一段错误的代码-----

<style type ="text/css">
<!-
a:hover{text-decoration:underline;color:blue}
a:link{text-decoration:underline;color: red}
a:visited{text-decoration:green}
->
</style>

<a href="https://www.jb51.net/">爱米</a>

这是正确的代码---------

<style type ="text/css">
<!-
a:link{text-decoration:underline;color: red}

a:hover{text-decoration:underline;color:blue}
a:visited{text-decoration:green}
->
</style>

<a href="https://www.jb51.net/">爱米</a>

为什么它回这样

1,首先有链接---没有有链接,还有鼠标在上面的效果?

2,第二步才能有鼠标在上面的效果------鼠标没有在上面或者没有取得焦点,怎么能有后面的点击后的效果?

3,最后才有点击后的效果。

呵呵,说得不很切切,明白意思就OK。

Copyright © 2016-2025 www.dzhlxh.cn 金源码 版权所有 Power by

网站模板下载|网络推广|微博营销|seo优化|视频营销|网络营销|微信营销|网站建设|织梦模板|小程序模板