---
title: "css border property"
author: "lokvin"
date: "2009-09-03T17:11:10Z"
tags: []
slug: "css-border-property"
draft: false
lastmod: "2009-09-03T17:11:10Z"
id: 461570
url: "https://lokvin.iteye.com/blog/461570"
---

The CSS border properties define the borders around an element.

border 有如下属性

border-width
border-style
border-color

上下左右的 border-style 和顺序相关。

The border-style property can have from one to four values.

    * border-style:dotted solid double dashed;
          o top border is dotted
          o right border is solid
          o bottom border is double
          o left border is dashed

    * border-style:dotted solid double;
          o top border is dotted
          o right and left borders are solid
          o bottom border is double

    * border-style:dotted solid;
          o top and bottom borders are dotted
          o right and left borders are solid

    * border-style:dotted;
          o all four borders are dotted


可以简写 

border:5px solid red;

When using the border property, the order of the values are:

    * border-width
    * border-style
    * border-color

具体参见：<http://www.w3schools.com/css/css_border.asp>