Border Property

តាម​រយៈ border property យើង​អាច​ច្នៃ​រចនា​ខ្សែ​វ័ណ្ឌ​ជុំវិញ​ element ទាំងឡាយ​បាន​ទៅ​តាម​បំណង​ប្រាថ្នា​របស់​យើង​។ property នេះ​ចែក​ចេញ​ជា property មួយ​ចំនួន​ទៀត​មាន​ដូចជា border-style, border-width, border-color, border-sides, border-radius ជាដើម​។

border-style ត្រូវ​ប្រើប្រាស់​សំរាប់​ធ្វើការ​រចនា​ខ្សែវ័ណ្ឌ​របស់ element អោយ​មាន​លក្ខណៈ​ជា​ខ្សែ​ជាប់​ឬ​ខ្សែ​ដាច់ និង​លក្ខណៈ​មួយ​ចំនួន​ទៀត​។
<!DOCTYPE html>
<html>
  <head>
  	<meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
  	<title>Border Property</title>
    <style>
      p.dotted {border-style: dotted;}
	  p.dashed {border-style: dashed;}
	  p.solid {border-style: solid;}
	  p.double {border-style: double;}
	  p.groove {border-style: groove;}
	  p.ridge {border-style: ridge;}
	  p.inset {border-style: inset;}
	  p.outset {border-style: outset;}
	  p.none {border-style: none;}
	  p.hidden {border-style: hidden;}
	  p.mix {border-style: dotted dashed solid double;}
    </style>
  </head>
  
  <body>
	

The border-style Property

This property specifies what kind of border to display:

A dotted border.

A dashed border.

A solid border.

A double border.

A groove border.

A ridge border.

An inset border.

An outset border.

No border.

A mixed border.

</body> </html>

The border-style Property

This property specifies what kind of border to display:

A dotted border.

A dashed border.

A solid border.

A double border.

A groove border.

A ridge border.

An inset border.

An outset border.

No border.

A mixed border.


យ៉ាងណាម៉ិញ បើ​សិន​ជា​យើង​ចង់​កំណត់​ពី​កំរាស់​នៃ​ខ្សែវ័ណ្ឌ​រប់ស element ទាំងឡាយ យើង​ត្រូវ​ប្រើប្រាស់ property border-width ដូច​ខាង​ក្រោម​នេះ៖

<!DOCTYPE html>
<html>
  <head>
  	<meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
  	<title>Border Property</title>
    <style>
      p.one {
  	  border-style: solid;
  	  border-width: 5px;
	  }

	  p.two {
  	    border-style: solid;
  		border-width: medium;
	  }

	  p.three {
  		border-style: dotted;
  		border-width: 2px;
	  }

	  p.four {
  		border-style: dotted;
  		border-width: thick;
	  }

	  p.five {
  		border-style: double;
  		border-width: 15px;
	  }

	  p.six {
  		border-style: double;
  		border-width: thick;
	  }
    </style>
  </head>
  
  <body>
	

The border-width Property

This property specifies the width of the four borders:

Some text.

Some text.

Some text.

Some text.

Some text.

Some text.

Note: The "border-width" property does not work if it is used alone. Always specify the "border-style" property to set the borders first.

</body> </html>

The border-width Property

This property specifies the width of the four borders:

Some text.

Some text.

Some text.

Some text.

Some text.

Some text.

Note: The "border-width" property does not work if it is used alone. Always specify the "border-style" property to set the borders first.


តែ​បើ​យើង​ចង់​អោយ​ខ្សែវ័ណ្ឌ​នៅ​តាម​ជ្រុង​និមួយ​ៗ​របស់ element មាន​កំរាស់​ខុស​គ្នា​វិញ យើង​ត្រូវ​ធ្វើ​ដូច​ខាង​ក្រោម​នេះ៖

<!DOCTYPE html>
<html>
  <head>
  	<meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
  	<title>Border Property</title>
    <style>
      p.one {
  		border-style: solid;
  		border-width: 5px 20px; /* 5px top and bottom, 20px on the sides */
	  }

	  p.two {
  		border-style: solid;
  		border-width: 20px 5px; /* 20px top and bottom, 5px on the sides */
	  }

	  p.three {
  		border-style: solid;
  		border-width: 25px 10px 4px 35px; /* 25px top, 10px right, 4px bottom and 35px left */
	  }
    </style>
  </head>
  
  <body>
	

The border-width Property

The border-width property can have from one to four values (for the top border, right border, bottom border, and the left border):

Some text.

Some text.

Some text.

</body> </html>

The border-width Property

The border-width property can have from one to four values (for the top border, right border, bottom border, and the left border):

Some text.

Some text.

Some text.


border-color គឺ​ជា property ប្រើ​សំរាប់​កំណត់​ពណ៌​អោយ​ខ្សែ​វ័ណ្ឌ​ជុំវិញ element ។

<!DOCTYPE html>
<html>
  <head>
  	<meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
  	<title>Border Property</title>
    <style>
      p.one {
  		border-style: solid;
  		border-color: red;
	  }

	  p.two {
  		border-style: solid;
  		border-color: green;
	  } 

	  p.three {
  		border-style: dotted;
  		border-color: blue;
	  } 
    </style>
  </head>
  
  <body>
	

The border-color Property

This property specifies the color of the four borders:

A solid red border

A solid green border

A dotted blue border

Note: The "border-color" property does not work if it is used alone. Use the "border-style" property to set the borders first.

</body> </html>

The border-color Property

This property specifies the color of the four borders:

A solid red border

A solid green border

A dotted blue border

Note: The "border-color" property does not work if it is used alone. Use the "border-style" property to set the borders first.


នៅ​ក្នុង​ការអនុវត្ត​ជាក់ស្តែង គេនិយម​ប្រើប្រាស់ property border តែ​មួយ​ដើម្បី​សរុប​ការកំណត់​ខ្សែវ័ណ្ឌ​របស់ element ដូច​ខាង​ក្រោម​នេះ៖

<!DOCTYPE html>
<html>
  <head>
  	<meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
  	<title>Border Property</title>
    <style>
     p {
  		border: 5px solid red;
	 }
    </style>
  </head>
  
  <body>
	

The border Property

This property is a shorthand property for border-width, border-style, and border-color.

</body> </html>

The border Property

This property is a shorthand property for border-width, border-style, and border-color.