css中,图片描边border且框内有距离的效果怎么写啊?

html-css0154

css中,图片描边border且框内有距离的效果怎么写啊?,第1张

img{

background:#fff

border:1px solid #ccc

padding:2px

}

还有不懂再M我

透明色可以是任意的颜色,就是一种颜色加的透明度。

CSS透明度的代码:

opacity:0.3

filter:alpha(opacity=30)

background:#000

这个的意思就是在黑色的基础上,透明度是百分五十。

根据你需要的颜色自己选择色值就行了。

了解 opacity 属性  不透明是100  要求30%  就是

opacity:0.3

       filter:alpha(opacity=30)

border-image 属性是一个简写属性,用于设置以下属性:

border-image-source

border-image-slice

border-image-width

border-image-outset

border-image-repeat

border-image-source

用在边框的图片的路径。

border-image-slice

图片边框向内偏移。

border-image-width

图片边框的宽度。

border-image-outset

边框图像区域超出边框的量。

border-image-repeat

图像边框是否应平铺(repeated)、铺满(rounded)或拉伸(stretched)。