本文介绍了同一HTML页面上的不同颜色链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,我正尝试在同一页面上使用不同的颜色链接。我想要一些链接是蓝色的,一些链接是黑色的。
Hi I am trying to have different color links on the same page. I want some links to be blue and some links to be black. I am new to html and CSS so thank you in advance!
-Spencer
推荐答案CSS :
CSS:
A.class1 {color:red;} A.class1:link {text-decoration: none; color: red;} A.class1:visited {text-decoration: none; color: red;} A.class1:hover {text-decoration: underline; color: red;} A.class1:active {text-decoration: none; color: red;} A.class2 {color:blue;} A.class2:link {text-decoration: none; color: blue;} A.class2:visited {text-decoration: none; color: blue;} A.class2:hover {text-decoration: underline; color: blue;} A.class2:active {text-decoration: none; color: blue;}HTML :
HTML:
<a href="www.google" class="class1">Google</a> <a href="stackoverflow" class="class2">Stackoverflow</a>演示: cssdesk/qukaq
更多推荐
同一HTML页面上的不同颜色链接
发布评论