zoukankan      html  css  js  c++  java
  • css实现360导航首页超链接变色

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
    <link href="Untitled-9.css" rel="stylesheet" type="text/css" />
    </head>
    
    <body>
    <a href="http://www.sina.com.cn/">新浪首页</a>
    </body>
    </html>
    View Code
    @charset "utf-8";
    /* CSS Document */
    
    <style>
    *{
        margin:0px;
        padding:0px;}
        
    a:link{
        color:#000;
        text-decoration:none;
        }
    a:visited{
        color:#000;
        text-decoration:none;}
    a:hover{
        color:#F00;
        text-decoration:underline;}
    a:active{
        color:#F60;
        text-decoration:underline;}
    </style>
    View Code

    2、内嵌样式写法

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
    <style type="text/css">
    *{
        margin:0px;
        padding:0px;}
    a:link{
        color:#000;
        text-decoration:none}
    a:visited{
        color:#000;
        text-decoration:none;}
    a:hover{
        color:#F00;
        text-decoration:underline}
    a:active{
        color:#F60;
        text-decoration:underline}
        
    </style>
    </head>
    
    <body>
    <a href="http://www.sina.com.cn/">新浪首页</a>
    </body>
    </html>
    View Code

    结果如上图

  • 相关阅读:
    Java 时钟
    mybatis中的#和$的区别
    vuex数据管理-数据共享
    vuex数据管理-数据适配
    vue双向数据绑定原理
    基于VUE的SPA单页应用开发-加载性能篇
    vue2.0读书笔记3
    移动端软键盘收起监听
    移动端模态窗口的滚动和橡皮筋问题解决方案
    window.history的跳转实质-HTML5 history API 解析
  • 原文地址:https://www.cnblogs.com/wangchuanqi/p/5307359.html
Copyright © 2011-2022 走看看