返回

HTML、CSS 不想去掉下划线

发布时间:2022-06-23 07:33:04 239
# css

<!DOCTYPE html>

<html lang="en">

<head>

  <meta charset="UTF-8">

  <meta http-equiv="X-UA-Compatible" content="IE=edge">

  <meta name="viewport" content="width=device-width, initial-scale=1.0">

  <title>Coding Progress</title>

  <link rel="stylesheet" href="./stylesheet.css">

</head>

<body>

  <article>

    <header>

      <h1>Coding Path</h1>

      <h2>HTML CSS</h2>

    </header>

    <p>

        Computer programming is the process of performing a particular computation, usually by 

        designing and building an executable computer program.

        Programming involves tasks such as analysis, generating algorithms, profiling algorithms' 

        accuracy and resource consumption, and the implementation of algorithms.

    </p>

    <p>

      For young learners, programming helps to gain problem-solving skills i.e. to solve a problem in a logical as well as creative way. 

      Coding also enhances thinking ability and enables one to think logically, strategically and analytically.

    </p>

    <br>

    <footer>

      <a href="https://www.linkedin.com/in/realmilanez">

        <img src="./images/Dubai.png" alt="Dubai, Burj Khalifa">

      </a>

      <br><br>

      <q style="font-size:13px;">Make it work, make it right, make it fast.</q>

    </footer>

  </article>

</body>

</html>

目前我终于可以使用 .css 进行操作,但是当我将鼠标悬停在图片上时,它会在其右侧创建红色下划线。我如何能够标记确切的图像并使程序忽略下划线,所以只有边框在悬停时变成白色......

这是 .CSS 中的代码:

a:link {

  color            : green;

  background-color : transparent;

  text-decoration  : none;

  }

a:visited {

  color            : pink;

  background-color : transparent;

  text-decoration  : none;

  }

a:hover {

  color            : red;

  background-color : transparent;

  text-decoration  : underline;

  }

a:active {

  color            : yellow;

  background-color : transparent;

  text-decoration  : underline;

  }

footer a:hover img, 

footer a:active img {

  color           : white;

  border-color    : white;

  text-decoration : none;

}  

 

  body {

    color:rgb(240,240,240);

    background: rgb(27,39,51);

    font-family: Roboto, Helvetica, Arial, Sans-serif;

    text-align: center;

    }

  footer img {

    width: 80px;

    border-radius: 70%;

    border: 2px solid orange;

    }

  h1, h2, h3 {

    margin:0;

    }

  h2 {

    font-size:16px;

    text-transform: uppercase;

    margin-top: 8px;

    }

  h1, strong, em {

    

    color: orange;

    }

  article {

    border: 1px solid #ccc;

    padding: 50px;

    margin: 50px auto;

    max-width: 420px;

  }

即使代码说要删除最后一部分中的装饰,图像也不会删除红色下划线

特别声明:以上内容(图片及文字)均为互联网收集或者用户上传发布,本站仅提供信息存储服务!如有侵权或有涉及法律问题请联系我们。
举报
评论区(2)
按点赞数排序
用户头像