
- CSS 教程
- CSS - 首頁
- CSS - 路線圖
- CSS - 簡介
- CSS - 語法
- CSS - 選擇器
- CSS - 引入
- CSS - 測量單位
- CSS - 顏色
- CSS - 背景
- CSS - 字型
- CSS - 文字
- CSS - 圖片
- CSS - 連結
- CSS - 表格
- CSS - 邊框
- CSS - 塊級邊框
- CSS - 內聯邊框
- CSS - 外邊距
- CSS - 列表
- CSS - 內邊距
- CSS - 游標
- CSS - 輪廓
- CSS - 尺寸
- CSS - 捲軸
- CSS - 內聯塊
- CSS - 下拉選單
- CSS - 可見性
- CSS - 溢位
- CSS - 清除浮動
- CSS - 浮動
- CSS - 箭頭
- CSS - 調整大小
- CSS - 引號
- CSS - 順序
- CSS - 定位
- CSS - 連字元
- CSS - 懸停
- CSS - 顯示
- CSS - 聚焦
- CSS - 縮放
- CSS - 平移
- CSS - 高度
- CSS - 連字元字元
- CSS - 寬度
- CSS - 不透明度
- CSS - z-index
- CSS - 底部
- CSS - 導航欄
- CSS - 覆蓋層
- CSS - 表單
- CSS - 對齊
- CSS - 圖示
- CSS - 圖片庫
- CSS - 註釋
- CSS - 載入器
- CSS - 屬性選擇器
- CSS - 組合器
- CSS - 根元素
- CSS - 盒模型
- CSS - 計數器
- CSS - 剪下
- CSS - 書寫模式
- CSS - Unicode-bidi
- CSS - min-content
- CSS - all
- CSS - inset
- CSS - 隔離
- CSS - 滾動溢位
- CSS - Justify Items
- CSS - Justify Self
- CSS - Tab Size
- CSS - 指標事件
- CSS - Place Content
- CSS - Place Items
- CSS - Place Self
- CSS - 最大塊級尺寸
- CSS - 最小塊級尺寸
- CSS - 混合模式
- CSS - 最大內聯尺寸
- CSS - 最小內聯尺寸
- CSS - 偏移量
- CSS - 口音顏色
- CSS - 使用者選擇
- CSS 高階
- CSS - 網格
- CSS - 網格佈局
- CSS - Flexbox
- CSS - 可見性
- CSS - 定位
- CSS - 層
- CSS - 偽類
- CSS - 偽元素
- CSS - @規則
- CSS - 文字效果
- CSS - 分頁媒體
- CSS - 列印
- CSS - 佈局
- CSS - 驗證
- CSS - 圖片精靈
- CSS - important
- CSS - 資料型別
- CSS3 教程
- CSS3 - 教程
- CSS - 圓角
- CSS - 邊框圖片
- CSS - 多背景
- CSS - 顏色
- CSS - 漸變
- CSS - 盒陰影
- CSS - 盒裝飾中斷
- CSS - 游標顏色
- CSS - 文字陰影
- CSS - 文字
- CSS - 2d 變換
- CSS - 3d 變換
- CSS - 過渡
- CSS - 動畫
- CSS - 多列
- CSS - 盒尺寸
- CSS - 提示框
- CSS - 按鈕
- CSS - 分頁
- CSS - 變數
- CSS - 媒體查詢
- CSS - 函式
- CSS - 數學函式
- CSS - 遮罩
- CSS - 形狀
- CSS - 樣式圖片
- CSS - 特異性
- CSS - 自定義屬性
- CSS 響應式
- CSS RWD - 簡介
- CSS RWD - 視口
- CSS RWD - 網格檢視
- CSS RWD - 媒體查詢
- CSS RWD - 圖片
- CSS RWD - 影片
- CSS RWD - 框架
- CSS 工具
- CSS - PX 到 EM 轉換器
- CSS - 顏色選擇器和動畫
- CSS 資源
- CSS - 有用資源
- CSS - 討論
CSS - border-image-outset 屬性
CSS 的 **border-image-outset** 屬性定義了邊框影像區域超出邊框框的距離,有效地將邊框影像從元素的內容和邊框邊緣推得更遠。
語法
border-image-outset: length | number | initial | inherit;
屬性值
值 | 描述 |
---|---|
長度 | 它指定了影像到邊框的距離。可以使用任何長度單位。預設值為 0。 |
數字 | 它指定邊框寬度的倍數。 |
initial | 這將屬性設定為其預設值。 |
inherit | 這從父元素繼承屬性。 |
CSS 邊框影像突出屬性示例
以下示例使用不同的值說明了 **border-image-outset** 屬性。
使用長度值的邊框影像突出屬性
outset 引數決定了影像到邊框的距離,此距離可以透過長度來指定(10px、50px 等)。在以下示例中,**border-image-outset** 屬性使用了三個不同的長度值來突出顯示差異。
示例
<!DOCTYPE html> <html> <head> <style> body { display: grid; justify-content: center; } .outer-box { margin-top: 45px; margin-bottom: 20px; padding: 20px; background-color: lightgreen; height: 200px; width: 200px; } .inner { height: 100px; width: 100px; padding: 35px; border: 15px solid transparent; border-image: url('/css/images/white-flower.jpg') 20 round; } .inner-box1 { border-image-outset: 5px; } .inner-box2 { border-image-outset: 25px; } .inner-box3 { border-image-outset: 42px; } </style> </head> <body> <h2> CSS border-image property </h2> <div class="outer-box"> <div class="inner-box1 inner"> <p> This box has 5px outset </p> </div> </div> <div class="outer-box"> <div class="inner-box2 inner"> <p> This box has 25px outset </p> </div> </div> <div class="outer-box"> <div class="inner-box3 inner"> <p> This box has 42px outset </p> </div> </div> </body> </html>
使用數值的邊框影像突出屬性
邊框的距離也可以透過數值來指定(2、4 等),它們表示邊框寬度的倍數。在以下示例中,**border-image-outset** 屬性使用了三個不同的數值來突出顯示差異。
示例
<!DOCTYPE html> <html> <head> <style> body { display: grid; justify-content: center; } .outer-box { margin-top: 45px; margin-bottom: 30px; padding: 20px; background-color: lightgreen; height: 200px; width: 200px; } .inner { height: 100px; width: 100px; padding: 35px; border: 15px solid transparent; border-image: url('/css/images/white-flower.jpg') 20 round; } .inner-box1 { border-image-outset: 1; } .inner-box2 { border-image-outset: 2; } .inner-box3 { border-image-outset: 4; } </style> </head> <body> <h2> CSS border-image property </h2> <div class="outer-box"> <div class="inner-box1 inner"> <p> This box has 1 value outset </p> </div> </div> <div class="outer-box"> <div class="inner-box2 inner"> <p> This box has 2 value outset </p> </div> </div> <div class="outer-box"> <div class="inner-box3 inner"> <p> This box has 4 value outset </p> </div> </div> </body> </html>
使用多個值的邊框影像突出屬性
**border-image-outset** 屬性最多可以接受四個值。單個值應用於所有邊框,兩個值設定頂部/底部和左側/右側,三個值覆蓋頂部、右側和底部,四個值分別指定每個邊框。這在以下示例中顯示。
示例
<!DOCTYPE html> <html> <head> <style> body { display: grid; justify-content: center; } .outer-box { margin-top: 45px; margin-bottom: 30px; padding: 20px; background-color: lightgreen; height: 200px; width: 200px; } .inner { height: 100px; width: 100px; padding: 35px; border: 15px solid transparent; border-image: url('/css/images/white-flower.jpg') 20 round; } .inner-box1 { border-image-outset: 1; } .inner-box2 { border-image-outset: 20px 40px; } .inner-box3 { border-image-outset: 2 4 5; } .inner-box4 { border-image-outset: 15px 20px 45px 55px; } </style> </head> <body> <h2> CSS border-image property </h2> <div class="outer-box"> <div class="inner-box1 inner"> <p> This box has single outset, all borders have same outset </p> </div> </div> <div class="outer-box"> <div class="inner-box2 inner"> <p> This box has 2 outset values, top and bottom have one outset, left and right have another outset. </p> </div> </div> <div class="outer-box"> <div class="inner-box3 inner"> <p> This box has 3 outset values, top has one outset, right has one outset and bottom has one outset. </p> </div> </div> <div class="outer-box"> <div class="inner-box4 inner"> <p> This box has 4 outset values, top has one outset, right has one outset, bottom has one outset and left has one outset. </p> </div> </div> </body> </html>
支援的瀏覽器
屬性 | ![]() |
![]() |
![]() |
![]() |
![]() |
---|---|---|---|---|---|
border-image-outset | 15.0 | 11.0 | 15.0 | 6.0 | 15.0 |
css_properties_reference.htm
廣告