18910140161

按钮的HTML标签重定向到仅用于按钮堆栈溢出的链接

顺晟科技

2022-10-19 12:20:56

193

我试图使这个网站,你可以下载一些我做的代码,但我不是真的很好在HTML和CSS。很抱歉我做了一些非常引人注目的事情。

不管怎样,这是我的代码:

<!DOCTYPE html>
<html>
    <head>
        <title>Downloads</title>
        <link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
        <link rel="stylesheet" href="css.css"> 
    </head>

<body>
    <div class="w3-bar darktheme">
        <a href="/" class="w3-bar-item w3-button w3-mobile"><img src="img/logo.png" alt="CodeDownloads"></a>
        <a href="windows.html" class="w3-bar-item w3-button w3-mobile">My Main Projects</a>
        <a href="linux.html" class="w3-bar-item w3-button w3-mobile">Other</a>
        <a href="software.html" class="w3-bar-item w3-button w3-mobile">Compiled</a>
        <a href="about.html" class="w3-bar-item w3-button w3-mobile">About</a>
    </div>
    <br>
    <label class=white>Title 1</label>
    <a href="https://drive.google.com/file/d/1GO9wvJV7oJViSou8yVCaSsNqWAsf7FxM/view?usp=sharing">
   <button class=button>Download</button>
   <br>
   <br>
    <label class=white>Title 2</label>
    <a href="https://drive.google.com/file/d/1GO9wvJV7oJViSou8yVCaSsNqWAsf7FxM/view?usp=sharing">
   <button class=button>Download</button>
   <br>
   <br>
    <label class=white>Title 3</label>
    <a href="https://drive.google.com/file/d/1GO9wvJV7oJViSou8yVCaSsNqWAsf7FxM/view?usp=sharing">
   <button class=button>Download</button>
   <br>
   <br>
    <label class=white>Title 4</label>
    <a href="https://drive.google.com/file/d/1GO9wvJV7oJViSou8yVCaSsNqWAsf7FxM/view?usp=sharing">
   <button class=button>Download</button>
   <br>
   <br>
    <label class=white>Title 5</label>
    <a href="https://drive.google.com/file/d/1GO9wvJV7oJViSou8yVCaSsNqWAsf7FxM/view?usp=sharing">
   <button class=button>Download</button>
   <br>
   <br>
    <label class=white>Title 6</label>
    <a href="https://drive.google.com/file/d/1GO9wvJV7oJViSou8yVCaSsNqWAsf7FxM/view?usp=sharing">
   <button class=button>Download</button>
   <br>
   <br>
    <label class=white>Title 7</label>
    <a href="https://drive.google.com/file/d/1GO9wvJV7oJViSou8yVCaSsNqWAsf7FxM/view?usp=sharing">
   <button class=button>Download</button>
   <br>
   <br>
    <label class=white>Title 8</label>
    <a href="https://drive.google.com/file/d/1GO9wvJV7oJViSou8yVCaSsNqWAsf7FxM/view?usp=sharing">
   <button class=button>Download</button>
   <br>
   <br>
    <label class=white>Title 9</label>
    <a href="https://drive.google.com/file/d/1GO9wvJV7oJViSou8yVCaSsNqWAsf7FxM/view?usp=sharing">
   <button class=button>Download</button>
   <br>
   <br>
    <label class=white>Title 10</label>
    <a href="https://drive.google.com/file/d/1GO9wvJV7oJViSou8yVCaSsNqWAsf7FxM/view?usp=sharing">
   <button class=button>Download</button>
   <br>
   <br>
    <label class=white>Title 11</label>
    <a href="https://drive.google.com/file/d/1GO9wvJV7oJViSou8yVCaSsNqWAsf7FxM/view?usp=sharing">
   <button class=button>Download</button>
</a>
</body>
</html>

标签(例如)也会重定向。我一点也不想那样。我只想它是正常的短信。如果我尝试使用段落标记,它会显示在按钮上方,这可能会让一些人感到困惑。

谢谢


顺晟科技:

您的结构必须如下所示:

<!DOCTYPE html>
<html>
    <head>
        <title>Downloads</title>
        <link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
        <link rel="stylesheet" href="css.css"> 
    </head>

<body>
    <div class="w3-bar darktheme">
        <a href="/" class="w3-bar-item w3-button w3-mobile"><img src="img/logo.png" alt="CodeDownloads"></a>
        <a href="windows.html" class="w3-bar-item w3-button w3-mobile">My Main Projects</a>
        <a href="linux.html" class="w3-bar-item w3-button w3-mobile">Other</a>
        <a href="software.html" class="w3-bar-item w3-button w3-mobile">Compiled</a>
        <a href="about.html" class="w3-bar-item w3-button w3-mobile">About</a>
    </div>
    <br>
    <label class=white>Title 1</label>
    <a href="https://drive.google.com/file/d/1GO9wvJV7oJViSou8yVCaSsNqWAsf7FxM/view?usp=sharing">
   <button class=button>Download</button>
   <br>
   <br>
    <label class=white>Title 2</label>
    <a href="https://drive.google.com/file/d/1GO9wvJV7oJViSou8yVCaSsNqWAsf7FxM/view?usp=sharing">
   <button class=button>Download</button>
   <br>
   <br>
    <label class=white>Title 3</label>
    <a href="https://drive.google.com/file/d/1GO9wvJV7oJViSou8yVCaSsNqWAsf7FxM/view?usp=sharing">
   <button class=button>Download</button>
   <br>
   <br>
    <label class=white>Title 4</label>
    <a href="https://drive.google.com/file/d/1GO9wvJV7oJViSou8yVCaSsNqWAsf7FxM/view?usp=sharing">
   <button class=button>Download</button>
   <br>
   <br>
    <label class=white>Title 5</label>
    <a href="https://drive.google.com/file/d/1GO9wvJV7oJViSou8yVCaSsNqWAsf7FxM/view?usp=sharing">
   <button class=button>Download</button>
   <br>
   <br>
    <label class=white>Title 6</label>
    <a href="https://drive.google.com/file/d/1GO9wvJV7oJViSou8yVCaSsNqWAsf7FxM/view?usp=sharing">
   <button class=button>Download</button>
   <br>
   <br>
    <label class=white>Title 7</label>
    <a href="https://drive.google.com/file/d/1GO9wvJV7oJViSou8yVCaSsNqWAsf7FxM/view?usp=sharing">
   <button class=button>Download</button>
   <br>
   <br>
    <label class=white>Title 8</label>
    <a href="https://drive.google.com/file/d/1GO9wvJV7oJViSou8yVCaSsNqWAsf7FxM/view?usp=sharing">
   <button class=button>Download</button>
   <br>
   <br>
    <label class=white>Title 9</label>
    <a href="https://drive.google.com/file/d/1GO9wvJV7oJViSou8yVCaSsNqWAsf7FxM/view?usp=sharing">
   <button class=button>Download</button>
   <br>
   <br>
    <label class=white>Title 10</label>
    <a href="https://drive.google.com/file/d/1GO9wvJV7oJViSou8yVCaSsNqWAsf7FxM/view?usp=sharing">
   <button class=button>Download</button>
   <br>
   <br>
    <label class=white>Title 11</label>
    <a href="https://drive.google.com/file/d/1GO9wvJV7oJViSou8yVCaSsNqWAsf7FxM/view?usp=sharing">
   <button class=button>Download</button>
</a>
</body>
</html>

必须关闭'a'标记,并记住类必须在引号中

您需要在按钮后面添加关闭锚标记。例如:

<!DOCTYPE html>
<html>
    <head>
        <title>Downloads</title>
        <link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
        <link rel="stylesheet" href="css.css"> 
    </head>

<body>
    <div class="w3-bar darktheme">
        <a href="/" class="w3-bar-item w3-button w3-mobile"><img src="img/logo.png" alt="CodeDownloads"></a>
        <a href="windows.html" class="w3-bar-item w3-button w3-mobile">My Main Projects</a>
        <a href="linux.html" class="w3-bar-item w3-button w3-mobile">Other</a>
        <a href="software.html" class="w3-bar-item w3-button w3-mobile">Compiled</a>
        <a href="about.html" class="w3-bar-item w3-button w3-mobile">About</a>
    </div>
    <br>
    <label class=white>Title 1</label>
    <a href="https://drive.google.com/file/d/1GO9wvJV7oJViSou8yVCaSsNqWAsf7FxM/view?usp=sharing">
   <button class=button>Download</button>
   <br>
   <br>
    <label class=white>Title 2</label>
    <a href="https://drive.google.com/file/d/1GO9wvJV7oJViSou8yVCaSsNqWAsf7FxM/view?usp=sharing">
   <button class=button>Download</button>
   <br>
   <br>
    <label class=white>Title 3</label>
    <a href="https://drive.google.com/file/d/1GO9wvJV7oJViSou8yVCaSsNqWAsf7FxM/view?usp=sharing">
   <button class=button>Download</button>
   <br>
   <br>
    <label class=white>Title 4</label>
    <a href="https://drive.google.com/file/d/1GO9wvJV7oJViSou8yVCaSsNqWAsf7FxM/view?usp=sharing">
   <button class=button>Download</button>
   <br>
   <br>
    <label class=white>Title 5</label>
    <a href="https://drive.google.com/file/d/1GO9wvJV7oJViSou8yVCaSsNqWAsf7FxM/view?usp=sharing">
   <button class=button>Download</button>
   <br>
   <br>
    <label class=white>Title 6</label>
    <a href="https://drive.google.com/file/d/1GO9wvJV7oJViSou8yVCaSsNqWAsf7FxM/view?usp=sharing">
   <button class=button>Download</button>
   <br>
   <br>
    <label class=white>Title 7</label>
    <a href="https://drive.google.com/file/d/1GO9wvJV7oJViSou8yVCaSsNqWAsf7FxM/view?usp=sharing">
   <button class=button>Download</button>
   <br>
   <br>
    <label class=white>Title 8</label>
    <a href="https://drive.google.com/file/d/1GO9wvJV7oJViSou8yVCaSsNqWAsf7FxM/view?usp=sharing">
   <button class=button>Download</button>
   <br>
   <br>
    <label class=white>Title 9</label>
    <a href="https://drive.google.com/file/d/1GO9wvJV7oJViSou8yVCaSsNqWAsf7FxM/view?usp=sharing">
   <button class=button>Download</button>
   <br>
   <br>
    <label class=white>Title 10</label>
    <a href="https://drive.google.com/file/d/1GO9wvJV7oJViSou8yVCaSsNqWAsf7FxM/view?usp=sharing">
   <button class=button>Download</button>
   <br>
   <br>
    <label class=white>Title 11</label>
    <a href="https://drive.google.com/file/d/1GO9wvJV7oJViSou8yVCaSsNqWAsf7FxM/view?usp=sharing">
   <button class=button>Download</button>
</a>
</body>
</html>
  • TAG:
相关文章
我们已经准备好了,你呢?
2024我们与您携手共赢,为您的企业形象保驾护航