概要:使用の国境タグ
境界タグを対照として色(カラー)、パターン(スタイル)、幅(幅)クラスすることができ、
また、縦方向と横方向に制御することができます。
色(カラー)、パターン(スタイル)、幅(幅)特性
1.border色
ボーダーカラーは、RGBに名前を付けることができ、Hexが示され
例如:ボーダー色:青;、ボーダー色:RGB(0,0,255);,ボーダー色:#1 0000FF ;,
ボーダーカラー:透明
2.borderスタイル
CSS pとして書かれた{ボーダースタイル:なし;}
各ボーダースタイルモードの以下の列挙
、注意してください、あなたはさまざまなプロパティの境界線を操作したいときのborder-styleモードを指定してください
そうでない場合は、境界効果はありません。
3.border幅
境界線の太さを設定するために使用され、
たとえば、次のボーダー幅:5pxの;または3つのモードがデフォルト
ボーダー幅:細い;、ボーダー幅:媒体と、ボーダー幅:厚いです
AAA
AAA
AAA
二つは、アップ制御およびダウンすることができます(のborder-top、のborder-bottom、ボーダー、左、国境右)
カラー(色)、パターン(スタイル)、幅(幅)特性
例如:のborder-top-色:赤;、のborder-top-スタイル:固体;、のborder-bottom-幅:10pxの; ...等等。
中間言葉の方向は省略してもよいです
例えば:
ボーダースタイル:点在し、垂直方向と水平方向の点線の範囲
ボーダースタイル:固体点在し、ほぼ垂直、固体範囲の点線の範囲
ボーダースタイル:ダブル固体点在し、固体範囲の範囲に点在する約ある、の範囲を倍増
border-style: dotted solid double dashed; dotted影响范围为上,solid影响范围为右,double影响范围为下,dashed影响范围为左(顺时钟)
由上可知,border-color与border-width一样类推
三、border shorthand property可控制颜色(color)、模式(style)、宽度(width)属性
例如:border: 5px solid red;
上例属性可不必按照顺序排列
另外一种模式为包含方向中间词
例如:border-top: thick double #ff0000;
四、范例
1、利用border属性来做三角形
2、对话框
CSS Talk Bubble configured by classes. Defaults to square shape, no triangle. Height is auto-adjusting to the height of the text.
This one adds a right triangle on the left, flush at the top by using .tri-right and .left-top to specify the location.
This talk-bubble uses .left-in class to show a triangle on the left slightly indented. Still a blocky square.
And now using .round we can smooth the sides down. Also uses .btm-left to show a triangle at the bottom flush to the left.
Now we add a border and it looks like a comic. Uses .border .round and .btm-left-in
Now flipped the other way and square. Uses .border and .btm-right-in
Flush to the bottom right. Uses .btm-right only.
Moving our way back up the right side indented. Uses .round and .right-in
And finally on the right flush at the top. Uses .round .border and .right-top
3、面包屑路径
CSS Breadcrumbs demo
参考数据:
CSS三角形产生器
How To Create Flat Style Breadcrumb Links with CSS