css border-image屬性
翻譯結果:
border
英[ˈbɔ:də(r)] 美[ˈbɔ:rdə(r)]
#n.邊界;邊;鑲邊;包;邊
vt.& vi.與…接界,在…的邊上
vt.沿…的邊,環繞…,給…鑲邊
##vi.近似,毗鄰第三人稱單數: borders 複數: borders 現在分詞: bordering 過去式: bordered 過去分詞: bordered#image
#[ ˈɪmɪdʒ] 美[ˈɪmɪdʒ] n.影像;肖像;概念,意向;鏡像,映像#vt.反映;想像;作…的像;象徵##第
#三人稱單數: images 複數: images 現在分詞: imaging 過去式: imaged 過去分詞: imaged
#css border-image屬性語法
作用:簡寫屬性,設定所有 border-image-* 屬性。
說明:border-image 屬性是一個簡寫屬性,用來設定下列屬性:border-image-source,border-image-slice,border-image-width,border-image -outset,border-image-repeat。如果省略值,會設定其預設值。
註解:請使用 border-image-* 屬性來建構漂亮的可伸縮按鈕!
css border-image屬性範例
<!DOCTYPE html> <html> <head> <style> div { border:15px solid transparent; width:300px; padding:10px 20px; } #round { -moz-border-image:url(http://img.php.cn/upload/article/000/005/656/5af270fd37755429.jpg) 30 30 round; /* Old Firefox */ -webkit-border-image:url(http://img.php.cn/upload/article/000/005/656/5af270fd37755429.jpg) 30 30 round; /* Safari and Chrome */ -o-border-image:url(http://img.php.cn/upload/article/000/005/656/5af270fd37755429.jpg) 30 30 round; /* Opera */ border-image:url(http://img.php.cn/upload/article/000/005/656/5af270fd37755429.jpg) 30 30 round; } #stretch { -moz-border-image:url(http://img.php.cn/upload/article/000/005/656/5af270fd37755429.jpg) 30 30 stretch; /* Old Firefox */ -webkit-border-image:url(http://img.php.cn/upload/article/000/005/656/5af270fd37755429.jpg) 30 30 stretch; /* Safari and Chrome */ -o-border-image:url(http://img.php.cn/upload/article/000/005/656/5af270fd37755429.jpg) 30 30 stretch; /* Opera */ border-image:url(http://img.php.cn/upload/article/000/005/656/5af270fd37755429.jpg) 30 30 stretch; } </style> </head> <body> <div id="round">在这里,图片铺满整个边框。</div> <br> <div id="stretch">在这里,图片被拉伸以填充该区域。</div> <p>这是我们使用的图片:</p> <img src="http://img.php.cn/upload/article/000/005/656/5af270fd37755429.jpg"> <p><b>注释:</b> Internet Explorer 不支持 border-image 属性。</p> <p>border-image 属性规定了用作边框的图片。</p> </body> </html>
執行實例 »
點擊 "執行實例" 按鈕查看線上實例