| Start |
|---|
| border-radius The border-radius property allows you to change the shape of the basic box model. Every corner of an element can have up to two values, for the vertical and horizontal radius of that corner (for a maximum of 8 values). The first set of values defines the horizontal radius. The optional second set of values, preceded by a ‘/’ , defines the vertical radius. If only one set of values is supplied, it is used for both the vertical and horizontal radius. The As with many CSS properties, shorthands can be used for any or all possible values. You can therefore specify anything from one to eight values. The following shorthand allows you to set the horizontal and vertical radius of every corner to the same value: HTML: CSS: Border-radius is most commonly used to convert box elements into circles. By setting the border-radius to half of the length of a square element, a circular element is created: Because border-radius accepts percentages, it is common to use 50% to avoid manually calculating the border-radius value: If the width and height properties are not equal, the resulting shape will be an oval rather than a circle. Browser specific border-radius example: |
| border-style The Examples:
|
| Multiple Borders Using outline: Using box-shadow: Using a pseudo element: http://jsfiddle.net/MadalinaTn/bvqpcohm/2/ (opens new window) |
| border (shorthands) In most cases you want to define several border properties ( Instead of writing: You can simply write: These shorthands are also available for every side of an element:
|
| border-image With the A
Consider the following example wheras border.png is a image of 90x90 pixels:
The image will be split into nine regions with 30x30 pixels. The edges will be used as the corners of the border while the side will be used in between. If the element is higher / wider than 30px this part of the image will be stretched. The middle part of the image defaults to be transparent. |
| border-collapse The Also see Tables - border-collapse (opens new window) documentation entry |
Creating a multi-colored border using border-image CSSHTMLThe above example would produce a border that comprises of 5 different colors. The colors are defined through a (Note: Additional properties were added to the element for presentational purpose.) You'd have noticed that the left border has only a single color (the start color of the gradient) while the right border also has only a single color (the gradient's end color). This is because of the way that border image property works. It is as though the gradient is applied to the entire box and then the colors are masked from the padding and content areas, thus making it look as though only the border has the gradient. Which border(s) have a single color is dependant on the gradient definition. If the gradient is a If the border is required only on specific sides of the element then the Note that, any element that has A box's backgrounds, but not its border-image, are clipped to the appropriate curve (as determined by ‘background-clip’). |
| border-[left|right|top|bottom] The For example if you wanted to add a border to the left side of an element, you could do: SyntaxRemarksRelated properties (opens new window): |
Read Article
https://develop.horje.com/learn/1434/reference