为什么有些css样式不起作用
发布时间:2009-11-07 00:30:10 作者:佚名
我要评论
为什么有些css代码没作用,比如下列代码,和排列有关.把css代码使用顺序换一下就可以了.
以下好像就是一段错误的代码-----
<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。
<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。
相关文章
- span 设CSS样式不起作用的情况,应该有很多的朋友都有见到过吧,小编今天也有遇到过,经搜索整理出来的经验就是先让span成块级元素显示,CSS样式才会起作用2013-10-23
- html-css设置标签样式过程中可能会发现所设置的样式不起作用,其实只要掌握以下两点便可解决问题2013-10-14
这篇文章主要介绍了CSS样式不起作用(史上最全解决方法汇总),小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧2020-03-30



最新评论