[英]CSS border not showing up?
So, in my CSS code, I have the following: 因此,在我的CSS代码中,我具有以下内容:
img {
border: 5px solid #fff;
margin: 5px;
position:relative;
-webkit-box-shadow: 1px 1px 1px 1px #ccc;
-moz-box-shadow: 1px 1px 1px 1px #ccc;
box-shadow: 1px 1px 1px 1px #ccc;
opacity: 0.5;
filter: alpha(opacity=50); /* For IE8 and earlier */
However, the 5px white border is not appearing, just the shadow. 但是,不会出现5px白色边框,只是阴影。 What am I missing?
我想念什么?
Edit: In response to all replies thus far, I obviously see that #fff is white, as I mentioned above, the "5px white border". 编辑:到目前为止,对于所有答复,我显然都看到#fff是白色的,如上所述,“ 5px白色边框”。 I want it to be white.
我希望它是白色的。
What's happening is that there is NO border showing up at all, just the img with a shadow. 发生的事情是根本没有边框出现,只有带有阴影的img。 But I want the 5px white border, then the shadow fall off of that.
但是我想要5px的白色边框,然后阴影消失了。 I've seen it elsewhere but for some reason it's not working for me.
我在其他地方看到过它,但是由于某种原因,它对我不起作用。
Your image has a border. 您的图像带有边框。 You used
#fff
as the border color which is the HEX code for white
. 您使用
#fff
作为边框颜色,它是white
的十六进制代码。 Change it to black
or something darker. 将其更改为
black
或较暗的颜色。
change your color of border: 5px solid #fff;
更改
border: 5px solid #fff;
的颜色border: 5px solid #fff;
to something like #000
.Your are not seeing border color because #fff
denotes white color and your body background color is also white. 到
#000
类的东西。您看不到边框颜色,因为#fff
表示白色,并且您的身体背景颜色也是白色。
您的img有边框,但是由于#fff是白色,所以您看不到边框(除非背景较暗)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.