Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/facebook/8.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
Css 边界宽度属性存在问题_Css - Fatal编程技术网

Css 边界宽度属性存在问题

Css 边界宽度属性存在问题,css,Css,在下面的示例.html文件中,border width属性在firefox 5或firefox 3.6.18中似乎没有任何作用 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/199

在下面的示例.html文件中,border width属性在firefox 5或firefox 3.6.18中似乎没有任何作用

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;" />
<style type="text/css">
  a:link img { 
    border-width: 1px;
    border-style: solid;
  }
</style>
</head>
<body>
<p><a href="alexander-cb.html"><img src="thumbs/thumb-avh.jpg" alt="CB" /></a> A court barony.</p>
</body>
</html>

a:链接img{
边框宽度:1px;
边框样式:实心;
}
宫廷男爵


我尝试了1px、3px和5px,但这并没有改变输出。为什么忽略边框宽度属性?

是否忘记为其指定边框颜色?如果未明确设置,则默认为透明。

是否尝试使用速记?(
border:1px纯蓝色
)它,在Firefox5(Ubuntu 11.04)中。你有没有比这更具体的规则(指定更多元素的祖先,使用任何基于
id
的选择器)超越了这条规则?它在Firefox5中也适用于我。我同意@david的看法,他怀疑你在其他地方可能有一条更具体的规则凌驾于此。如果您自己看不到问题,可能会发布更多代码。或者提供一个指向完整站点/jsfiddle的链接;没有正在调用的外部CSS。(我在两台不同的机器上测试了firefox的两个版本);无论是否指定该属性,都会显示边框,但更改边框宽度不会产生任何效果。(我目前有一个版本的上述代码,其边框宽度为20px;和
边框颜色为#0000CC;
,边框虽然存在,但肯定不是20px,与我没有指定边框颜色的版本相同。示例位于)