Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/80.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 为什么href不处理我的内容?_Html_Css_Hyperlink - Fatal编程技术网

Html 为什么href不处理我的内容?

Html 为什么href不处理我的内容?,html,css,hyperlink,Html,Css,Hyperlink,出于某种原因,我只能在我的内容上做一个链接,当我尝试将它添加到整个div时,它根本不起作用。有人知道发生了什么吗,我正试图把函数作为一个链接。到目前为止还不起作用。我是不是在这里编错了代码,还是我遗漏了一个错误?谢谢 身体{ 背景色:323232; 宽度:100%; 填充:0; 保证金:0; 字体系列:Lato; } 导航a{ 颜色:fff; 文字装饰:无; 填充:20px 25px; 显示:内联块; } .固定页眉,.固定页脚{ 背景:333人; 颜色:fff; 宽度:100%; 位置:固定

出于某种原因,我只能在我的内容上做一个链接,当我尝试将它添加到整个div时,它根本不起作用。有人知道发生了什么吗,我正试图把函数作为一个链接。到目前为止还不起作用。我是不是在这里编错了代码,还是我遗漏了一个错误?谢谢

身体{ 背景色:323232; 宽度:100%; 填充:0; 保证金:0; 字体系列:Lato; } 导航a{ 颜色:fff; 文字装饰:无; 填充:20px 25px; 显示:内联块; } .固定页眉,.固定页脚{ 背景:333人; 颜色:fff; 宽度:100%; 位置:固定; 文本对齐:居中; z指数:10; 背景色:202020; } .固定收割台{ 排名:0; } .固定页脚{ 底部:0; 填充:20px 0px; } .固定标题a:悬停{ 颜色:C1C1; } .固定页脚a{ 颜色:fff; 字体重量:较轻; 文字装饰:无; } .组内容{ 最大宽度:960像素; 文本对齐:居中; 宽度:75%; 保证金:100像素自动; 显示器:flex; 柔性包装:包装; 对正内容:空间均匀; } .组内容h3{ 边缘顶部:10px; 字体大小:正常; 字体大小:20px; 颜色:白色; } .组内容p{ 利润上限:3倍; 字体重量:较轻; 字体大小:20px; 颜色:白色; } .内容{ 宽度:30%; 背景色:202020; 显示器:flex; 弯曲方向:立柱; 填充:20px 0 20px 0; 对齐项目:居中; 边缘顶部:20px; } .内容>*{ 最大宽度:200px; 文本对齐:居中; 保证金:0; } @字体{ 字体系列:Lato; 字体大小:正常; 字体风格:普通; src:url'font/Lato Regular.eot', src:url'font/Lato Regular.eot?iefix'format'embedded-opentype', url'font/Lato Regular.ttf'格式'truetype', url'font/Lato Regular.woff'格式'woff', url'font/Lato Regular.woff2'格式'woff2'; } @字体{ 字体系列:Lato; 字体大小:粗体; 字体风格:普通; src:url'font/Lato Bold.eot', src:url'font/Lato Bold.eot?iefix'format'embedded-opentype', url'fonts/Lato Bold.ttf'格式'truetype', url'fonts/Lato Bold.woff'格式'woff', url'fonts/Lato Bold.woff2'格式'woff2'; } @字体{ 字体系列:Lato; 字体重量:较轻; 字体风格:普通; src:url'font/Lato Light.eot', src:url'font/Lato Light.eot?iefix'format'embedded-opentype', url'fonts/Lato Light.ttf'格式'truetype', url'fonts/Lato Light.woff'格式'woff', url'fonts/Lato Light.woff2'格式'woff2'; } Kumo99.cf Arma 3:流放服务器 一个改进流亡国防部的项目

保留空间 为未来项目预留空间

保留空间 为未来项目预留空间

保留空间 为未来项目预留空间

保留空间 为未来项目预留空间

保留空间 为未来项目预留空间

你的密码

<div class="content" href="index.html">
不会像你希望的那样工作。相反,您需要使用Javascript对行为进行编程:

<div class="content" onclick="window.location.href='index.html';">
你的密码

<div class="content" href="index.html">
不会像你希望的那样工作。相反,您需要使用Javascript对行为进行编程:

<div class="content" onclick="window.location.href='index.html';">
试试这个

试试这个

A不能具有href属性。href只能在 A不能具有href属性。href只能在
“href”属性对“div”元素无效href'属性仅适用于'a'标记。因此,将'div'元素包装在'a'元素中


“href”属性对“div”元素无效href'属性仅适用于'a'标记。因此,将'div'元素包装在'a'元素中


这似乎是最合适的答案。这似乎是最合适的答案。请为链接元素a添加适当的CSS代码。请为链接元素a添加适当的CSS代码。感谢href信息,它工作得非常好。感谢href信息,它工作得非常好。