开发者

HTML: How to attach border image to a div

I need a shadow box border for my content div. Currently I am using the following code in the css to achieve this.

border-radius: 2px;
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
-webkit-box-shadow: rgba(0, 0, 0, .496094) 0开发者_JS百科px 1px 10px;
-moz-box-shadow: rgba(0, 0, 0, .496094)

But this only works fine with Google Chrome. The shadow box is not applied in other browsers. So I need to know how to use a border image to get repeated with div. Also tell me appropriate size of the image to be used... Thanks...


The reason it only works in Chrome is because that's the only browser you gave any values to. For the Firefox rules, you left out 0px 1px 10px
Also, you should order them properly and include the non-vendor specific property, as well to make it future proof. See here - http://css-tricks.com/ordering-css3-properties/
To get the shadow in IE without any images, check out http://css3pie.com.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜