border-width:邊框的寬度 thin 細的
medium 默認的
thick 粗的
不常用
數值px
border-style:none 沒有邊框 = hidden(用于表格除外,用來解決表格邊框沖突)
solid 實線型
dotted 點狀
dashed 虛線
double 雙線
border-color:十六進制 #fff transparent 透明
border: 1px solid #000;
border-top: 1px solid #000;上邊框
border-top-width
border-top-style
border-top-color
border-right:
border-bottom:
border-left:
css3新增的屬性
border-image: 使用圖片來填充邊框
border-image-source:圖片的來源,路徑
border-image-slice:圖片的分割方式
border-image-width:圖片的寬度
border-image-outset:圖片擴展
border-image-repeat:圖片重復
效果實現代碼:
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> *{padding: 0;margin: 0;} #box{ width: 300px; height: 400px; background: url(img/05.jpg); background-size:cover; margin: 150px auto; position: relative; overflow: hidden; } .left{width: 100%; height: 100%; background: rgba(122,0,0,0.5); position: absolute; top: 0; left: -100%; transition: all 2s; } .right{ width: 100%; height: 100%; background: rgba(0,0,135,0.5); position: absolute; top: 0; left: 100%; transition: all 4s; } #box:hover .left{ left:-50% } #box:hover .right{ left:50% } </style> </head> <body> <div id="box"> <div></div> <div></div> </div> </body> </html>
效果代碼就是上面這些了,感興趣的朋友可以手動操作一下,更多精彩請關注Gxl網其它相關文章!
相關閱讀:
HTML里怎么使用margin 0 auto
html里div居中需要注意哪些
html里的if注釋怎么使用
聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com