Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/77.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/40.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/security/4.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添加到div会移动图像_Html_Css_Image_Href - Fatal编程技术网

Html 将href添加到div会移动图像

Html 将href添加到div会移动图像,html,css,image,href,Html,Css,Image,Href,我想在图像中添加一个href。但问题是,每当我为href编写add时,图像都会移到div的右侧。是否还有其他方法可以修复它 没有href With href .search{ 宽度:75px; 高度:75px; 背景色:rgba(0,255,200,0.466); 左边距:自动; 页边顶部:自动; 页边距底部:自动; } 空格可能是标记中空格的结果。您可以删除标记中的空格,或者将图像和链接都设置为块元素显示。检查您周围的代码。使用css检查填充

我想在图像中添加一个href。但问题是,每当我为href编写add时,图像都会移到div的右侧。是否还有其他方法可以修复它

没有href

With href

.search{
宽度:75px;
高度:75px;
背景色:rgba(0,255,200,0.466);
左边距:自动;
页边顶部:自动;
页边距底部:自动;
}


空格可能是标记中空格的结果。您可以删除标记中的空格,或者将图像和链接都设置为块元素显示。

检查您周围的代码。使用css检查填充