?
This document uses PHP Chinese website manual Release
border:<line-width> || <line-style> || <color>
<line-width> = <length> | thin | medium | thick
<line-style> = none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset
默認值:看每個獨立屬性
適用于:所有元素
繼承性:無
動畫性:看每個獨立屬性
計算值:看每個獨立屬性
相關(guān)屬性:[ border-top ] || [ border-right ] || [ border-bottom ] || [ border-left ]
設(shè)置或檢索對象邊框?qū)挾取?/p>
設(shè)置或檢索對象邊框樣式。
設(shè)置或檢索對象邊框顏色。
如使用該復(fù)合屬性定義其單個參數(shù),則其他參數(shù)的默認值將無條件覆蓋各自對應(yīng)的單個屬性設(shè)置。
對應(yīng)的腳本特性為border。
Values | IE | Firefox | Chrome | Safari | Opera | iOS Safari | Android Browser | Android Chrome |
---|---|---|---|---|---|---|---|---|
Basic Support | 6.0+ | 2.0+ | 4.0+ | 3.1+ | 3.5+ | 3.2+ | 2.1+ | 18.0+ |
<!DOCTYPE html> <html lang="zh-cmn-Hans"> <head> <meta charset="utf-8" /> <title>border_CSS參考手冊_web前端開發(fā)參考手冊系列</title> <meta name="author" content="Joy Du(飄零霧雨), dooyoe@gmail.com, www.doyoe.com" /> <style> .test { border: 5px solid #000; } .test2 { margin-top: 10px; border: 5px solid; color: #f00; } </style> </head> <body> <div class="test">定義邊框特性</div> <div class="test2">邊框顏色默認使用文本顏色</div> </body> </html>
點擊 "運行實例" 按鈕查看在線實例