Changing font size

ကၽြန္ေတာ္တို႕ေတြ စာလံုးပံုစံကို ေအာက္က ပံုမ်ဳိးေလး ျဖစ္ေအာင္ လုပ္ၾကည့္ရေအာင္ Figure 4-1

အထက္ပါ ဥပမာမွာ စာလံုးေတြက ပံုမွန္ ထက္ႀကီးထားတာကို ေတြ႕ႏိုင္ပါလိမ့္မယ္။ အဲဒီအတြက္ ကၽြန္ေတာ္တို႕ေတြ CSS မွာ font-size ဆိုတာကို အသံုးျပဳရပါတယ္။

HTML code ကို ဒီလိုေရးထားပါတယ္။

<html>
<head>
    <title>Styling Text</title>
    <link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
    <h1>One Piece</h1>
    <p>One Piece is a Japanese shounen manga series written and illustrated by Eiichiro Oda. It has been serialized in Weekly Shōnen Jump since August 4, 1997; the individual chapters are being published in tankōbon volumes by Shueisha, with the first released on December 24, 1997, and the 70th volume released as of March 2013. One Piece follows the adventures of Monkey D. Luffy, a young boy whose body gains the properties of rubber after unintentionally eating a Devil Fruit, and his diverse crew of pirates, named the Straw Hat Pirates. Luffy explores the ocean in search of the world's ultimate treasure known as One Piece in order to become the next Pirate King.</p>
</body>
</html>

အဲဒီမွာ external style sheet ျဖစ္တဲ့ style.css ကို ေခၚထားတာကို ေတြ႕ႏိုင္ပါတယ္။ အဲဒီ style.css ထဲမွာေတာ့

h1 {
    font-size: 40px;
}

h1 ရဲ႕ font size ကို ကၽြန္ေတာ္ 40px ေပးထားပါတယ္။ ဒါေၾကာင့္ ပံုမွန္ h1 ထက္ ႀကီးေနရတာပါ။

font size ကို points (pt), pixels (px), millimeters (mm), centimeters (cm), inches (in), picas (pc), x-height (ex), သို႕မဟုတ္ em space (em) စတာေတြကို အသံုးျပဳႏိုင္ပါတယ္

ဒါ့အျပင္ (xx-small, x-small, small, medium, large, x-large, or xx-large) ေတြကိုလည္း အသံုးျပဳႏိုင္ပါတယ္။

results matching ""

    No results matching ""