Dot*_*nnn 2 html css html-table
我试图在其中包含一个链接<td></td>,但它根本没有显示.
<tr align=left>
<td><span style="font-weight:bold;">Website</span></td>
<td><a href="http://www.zionsb.org"></a></td>
</tr>
Run Code Online (Sandbox Code Playgroud)
CSS
td {
text-transform: none;
line-height: 115%;
vertical-align: middle;
padding: 5px 0 5px 5px;
}
Run Code Online (Sandbox Code Playgroud)
请问我哪里错了?
您必须在链接中包含一些内容才能显示.例如 :
<a href="http://www.zionsb.org">some text</a>
Run Code Online (Sandbox Code Playgroud)
如果您无需显示任何内容,也可以将click事件绑定到单元格:
<td id=A style="cursor:pointer"></td>
<script>
window.onload = function(){
document.getElementById('A').onclick=function(){window.location="http://www.zionsb.org"};
};
</script>
Run Code Online (Sandbox Code Playgroud)
但这并不能单独使链接可见.