图片边框border-image的语法
正式语法: <’border-image-source’> || <’border-image-slice’> [ / <’border-image-width’> | / <’border-image-width’>? / <’border-image-outset’> ]? || <’border-image-repeat’>
图片将会循环贴满边框区域
#repeat { border: 15px solid transparent; padding: 10px 20px; -moz-border-image:url(“/files/4127/border.png”) 30 30 repeat; / Old Firefox / -webkit-border-image:url(“/files/4127/border.png”) 30 30 repeat; / Safari / -o-border-image:url(“/files/4127/border.png”) 30 30 repeat; / Opera / border-image:url(“/files/4127/border.png”) 30 30 repeat;}
图片将会贴满边框区域
#round { border: 15px solid transparent; padding: 10px 20px; -moz-border-image:url(“/files/4127/border.png”) 30 30 round; / Old Firefox / -webkit-border-image:url(“/files/4127/border.png”) 30 30 round; / Safari / -o-border-image:url(“/files/4127/border.png”) 30 30 round; / Opera / border-image:url(“/files/4127/border.png”) 30 30 round;}
图片将会拉伸贴满边框区域.
#stretch { border: 15px solid transparent; padding: 10px 20px; -moz-border-image:url(“/files/4127/border.png”) 30 30 stretch; / Old Firefox / -webkit-border-image:url(“/files/4127/border.png”) 30 30 stretch; / Safari / -o-border-image:url(“/files/4127/border.png”) 30 30 stretch; / Opera / border-image:url(“/files/4127/border.png”) 30 30 stretch;}