Question document during H5 study (updating)

Table of contents

1. Allow tags in html and css

Two, css mouse slides in to display div

Three, git error solution

4. Set the line height for the h1 tag in ul>li


1. Let the tag <li> be displayed on the same line in html and css

The li tag is displayed on a line

Show results:

code block: 

<!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>Document</title>
    <style>
      li {
        float: left;
        padding: 30px;
        list-style: none;
        background: pink;
      }
    </style>
  </head>
  <body>
    <ul>
      <li>第1个</li>
      <li>第2个</li>
      <li>第3个</li>
      <li>第4个</li>
      <li>第5个</li>
    </ul>
  </body>
</html>

Two, css mouse slides in to display div

Show results:

code:

<!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>Document</title>
    <style>
      .hov {
        width: 200px;
        background-color: pink;
        background-repeat: 10px;
      }
      .hov > h1 {
        background-color: blueviolet;
        width: 200px;
        height: 50px;
        line-height: 50px;
        color: white;
        text-align: center;
        border-radius: 10px;
      }
      #no {
        display: none;
      }
      .hov:hover #no {
        display: block;
      }
    </style>
  </head>
  <body>
    <div class="hov">
      <h1>鼠标滑入显示</h1>
      <div id="no">
        <p>文字</p>
      </div>
    </div>
  </body>
</html>

Three, git error solution

Git error: [email protected]: Permission denied (publickey).

solution:

input the command

Regardless of the problems that come out after the input, keep pressing Enter to finally generate the SSH public key.

ssh-keygen -t rsa -C "[email protected]"
Continue to enter the following command
ssh -v [email protected]

Enter yes when there is a problem, the last two lines of code are

debug1:No more authentication methods to try

[email protected]:Permission denied (publickey)

continue typing commands
ssh-agent -s ssh-add ~/.ssh/id_rsa

At this time, after the ssh-add ~/.ssh/id_rsa command press Enter, the public key path information will appear, find the file id_rsa.pub, open the text, and copy all the contents.

Code cloud-SSH public key: Paste the content of the title key just copied.

The mailbox will receive a message that the addition is successful.

If an error occurs in ssh-add ~/.ssh/id_rsa, the solution:

报错Could not open a connection to your authentication agent.

Enter the following command:

eval `ssh-agent -s` 
ssh-add ~/.ssh/id_rsa

4. Set the line height for the h1 tag in ul>li

Show results: 

 code:

    <style>
      .a {
        line-height: 70px;
      }
      .B {
        line-height: 70px;
      }
    </style>
  </head>
  <body>
    <ul>
      <li class="a"><h1>内容</h1></li>
      <li>内容</li>
      <li class="B">内容</li>
      <li>内容</li>
      <li>内容</li>
    </ul>
  </body>

Guess you like

Origin blog.csdn.net/m0_62181310/article/details/131479426