gpt4 book ai didi

html - CSS HTML 如何删除表格中的整个单元格链接?

转载 作者:可可西里 更新时间:2023-11-01 13:10:20 26 4
gpt4 key购买 nike

我想要一个带有页脚的网页,其中有垂直对齐的链接。因此,我使用了一个表格,其中我写了我的链接,如“移动”、“帮助”、“条款”……

问题是,当将鼠标指向表格时,链接处于事件状态(即使在空单元格上)。当我将鼠标指向名称“Mobile”、“Help”、“Terms”时,我只想拥有链接 - 而不是当我指向单元格的其余部分或表格上的其他任何地方时。

我在 Stackoverflow 上研究了这个东西,但总是出现相反的问题(人们想要激活单元格链接)。

有人可以帮忙吗?代码如下。

HTML代码

    <div id="footer">
<div class = "box2">
<h6><a href="/error">Français</h6>
<h6><a href="/error">English (US)</h6>
<h6><a href="/error">Español</h6>
<h6><a href="/error">Português (Brasil)</h6>
<h6><a href="/error">Deutsch</h6>
<h6><a href="/error">Italiano</h6>
<h6><a href="/error">Русский</h6>
</div>

<div class = "box3">
<table class="table2">
<tr>
<td><h6><a href="/mobile">Mobile</h6></td>
<td><h6><a href="/help">Help</h6></td>
<td><h6><a href="/term">Terms and conditions</h6></td>
<td><h6><a href="/developers">Developers</h6></td>
<td><h6><a href="/carriers">Carriers</h6></td>
<td><h6><a href="/other">Other</h6></td>
</tr>
<tr>
<td><h6><a href="/blog">Blog</h6></td>
<td><h6><a href="/findus">Find us</h6></td>
<td><h6><a href="/pics">Pics</h6></td>
</tr>
</table>

</div>
</div>

CSS 代码

#footer {
height: 110px;
background: #80B2E6;
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#80B2E6), color-stop(100%,#3385D6));
background: -moz-linear-gradient(top, #80B2E6 0%, #3385D6 100%);
background: -webkit-linear-gradient(top, #80B2E6 0%, #3385D6 100%);
background: -o-linear-gradient(top, #80B2E6 0%, #3385D6 100%);
background: -ms-linear-gradient(top, #80B2E6 0%, #3385D6 100%);
background: linear-gradient(top, #80B2E6 0%, #3385D6 100%);
}

.box2
{
width:800px;
border-bottom:1px solid lightgrey;
display:inline-block;
padding-top:20px;
}

.box3
{
width:800px;
padding:0;
}


.table2 {
width:450px;
padding:0;
font-size:11px;
table-layout: auto;
float:left;
border-collapse:collapse;

}


h6 {
font-weight: normal;
font-size: 11px;
max-width: 800px;
color: white;
margin:0;
padding-bottom:3px;
padding-right:10px;
/*display:inline-block;*/
float:left;
}

h6 a:link {
color:white;
}

.table2 td a {
color:white;
display:inline;
}

a:link {
text-decoration:none;
color: #54544B;
}

table {
width:420px;
/*height: 200px;*/
padding:10px;
margin-bottom:10px;
border-collapse:collapse;
table-layout: fixed;
}

td
{
text-align:center;
position:center;
padding-top: 3px;
padding-bottom: 3px;
-webkit-hyphens: auto;
-moz-hyphens: auto;
-ms-hyphens: auto;
-o-hyphens: auto;
hyphens: auto;
word-wrap: break-word;
}

tr, div {

}

最佳答案

</a> 关闭所有链接标签.例如改变

<td><h6><a href="/mobile">Mobile</h6></td>

<td><h6><a href="/mobile">Mobile</a></h6></td>

以及所有链接的其余部分

关于html - CSS HTML 如何删除表格中的整个单元格链接?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24323110/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com