CSS属性边框颜色不起作用 [英] CSS Property Border-Color Not Working

查看:467
本文介绍了CSS属性边框颜色不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对边框颜色有疑问.没用我是CSS的新手,这是小提琴. http://jsfiddle.net/zeburrehman/aFzKy/151/

I have issue with border-color. It didn't work. I'm new to css here is the fiddle. http://jsfiddle.net/zeburrehman/aFzKy/151/

<div id="box">
Hello! The color of box border should be red!!
</div>​

#box {
border-color: red;
}​

推荐答案

默认情况下,border-width0border-stylenone

因此您需要将它们设置为border-width:1pxborder-style:solid.您可以将所有边框属性组合为一个,如下所示:

So you need to set them to border-width:1px and border-style:solid. You can combine all the border properties into one as below:

#box {
    border:1px solid red
}

这篇关于CSS属性边框颜色不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆