First, CSS settings style
1.1 Border border
Function: Set the border around the label, method board: Width style color, Normal style using solid solid, and dotted dashed
<Head> <MetaCharSet= "UTF-8"> <title>CSS Border</title> <style>. C1{Border:1px solid Red; } </style></Head><Body><Divclass= "C1">It's a nice day today.</Div></Body>
Border
There are also Border-top,border-left,border-right,border-bottom, the top of the border, the border to the left, the border to the right, the bottom of the border
1.2 Altitude height
Function: Set the height of the label, How to: Height: High, can be a specific number size such as: 20px, can also be a percentage: 80%, but the height does not have a fixed value, this setting is within a border, otherwise meaningless.
<Head> <MetaCharSet= "UTF-8"> <title>CSS Border</title> <style>. C1{Border:1px solid Red;Height:80px; } </style></Head><Body><Divclass= "C1">It's a nice day today.</Div></Body>
Height
1.3 Width widths
Function: Set the width of the label, how to use: Width: Size, this is the same as the height above, can be specific size: 50px, can also be set according to the browser size as a percentage: 80%
<style>. C1{Border:1px solid Red;Height:80px;width:70%; } </style>
width
1.4 Font Size Font-size
Role: Set the font size within the label, using: font-size: Font Size, example: font-size:20px
<style>. C1{Border:1px solid Red;Height:80px;width:70%;font-size:20px; }</style>
font-size
1.5 Font colors Color
Role: Set the font color within the label, using: color: Colors, Example: color:red
<style>. C1{Border:1px solid Red;Height:80px;width:70%;font-size:20px;Color:Blue; }</style>
Color
1.6 Font Bold Font-weight
Function: give you the font in the label is bold. How to use: Font-weight:bold
<style>. C1{Border:1px solid Red;Height:80px;width:70%;font-size:20px;Color:Blue;Font-weight:Bold; }</style>
Font-weight
1.7 Horizontal Center
Function: The font within the label can be horizontally centered. How to use: Text-align:center
<style>. C1{Border:1px solid Red;Height:80px;width:70%;font-size:20px;Color:Blue;Font-weight:Bold;text-align:Center; }</style>
text-align
1.8 Center Vertically
Function: The font within the label can be horizontally centered. How to use: Line-height: Label height value.
<style>. C1{Border:1px solid Red;Height:80px;width:70%;font-size:20px;Color:Blue;Font-weight:Bold;text-align:Center;Line-height:80px; }</style>
Line-height
CSS borders and common styles