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
#css3 border-image屬性 語法
作用:使用圖片來建立邊框
說明:複合屬性。設定或檢索物件的邊框樣式使用圖像來填充。
border-image是CSS3中的一個簡寫屬性,透過該屬性可使用圖片來建立邊框
css3 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>
執行實例 »
點擊 "執行實例" 按鈕查看線上實例