html - href链接不可点击
问题描述
文本的颜色已更改,但似乎不可点击我不确定我在哪里犯了这个错误我对 HTML 和 CSS 很陌生
.column {
float: left;
width: 50%;
padding: 10px;
height:800px;
text-align: center;
color: white;
position: relative;
}
.centered {
position:absolute;
top: 430px;
left: 300px;
width: 100%
}
<!DOCTYPE html>
<html>
<div class="row">
<div class="column" style="background-color:#aaa;">
<img src="4.jpg"alt="Snow">
<div class="centered"><a href="http://www.google.com">Google</a></div>
</div>
解决方案
以下完整的 HTML 代码供您参考。在 SharePoint 中,您可以将代码添加到 Web 部件页面中的脚本编辑器 Web 部件中以检查它是否有效。
<!DOCTYPE html>
<html>
<head>
<style>
.column {
float: left;
width: 50%;
padding: 10px;
height:800px;
text-align: center;
color: white;
position: relative;
}
.centered {
position:absolute;
top: 430px;
left: 300px;
width: 100%
}
</style>
</head>
<body>
<div class="row">
<div class="column" style="background-color:#aaa;">
<img src="4.jpg" alt="Snow"/>
<div class="centered"><a href="http://www.google.com">Google</a></div>
</div>
</div>
</body>
</html>
如果href链接仍然无法点击,您可以使用IE/chrome F12检查点击链接时是否出现错误。
推荐阅读
- python - IBM Watson CPLEX 在求解 LP 文件时显示无变量、无解
- kubernetes - 将流量路由到副本集的特定 Pod
- arrays - 在 PowerShell 中控制函数返回的类型
- java - 在 Spring Boot 上下文中查询巨大的 CSV 是否有最佳实践?
- c# - c# 可选参数的最低要求
- amazon-web-services - 如何定义 ECS 的 CIDR 范围?
- python - 从导入的模块重新定义被调用的函数
- angular - Angular Material 表设置/禁用 filterPredicate 以搜索所有列
- python - 使用正则表达式查找字符串的一部分
- android - 如果已经登录,如何跳过登录 - 使用谷歌登录 - android