CSS basic tutorial size, font and text properties
CSS size attribute
width: element width, be sure to add px units.
height: Element height.
##CSS Font Properties
- font-size: text size. For example: font-size:14px;
- font-family: font. For example: font-family:Microsoft Yahei;
- font-style: italic, value: italic. For example: font-style:italic;
- font-weight: bold, value: bold. For example: font-weight:bold;
##CSS text property
- color: text color
- text-decoration: text decoration line, values: none, underline, overline, line-through (Strikethrough)
- text-align: text horizontal alignment, values: left, center, right
- line-height: line High, you can use a fixed value or a percentage. For example: line-height:24px; line-height:150%;
- text-indent: The first line is indented. For example: text-indent:28px;
- letter-spacing: word spacing.
- The examples are as follows
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>php.cn</title>
<style type="text/css">
h1{
color:red;
width:350px;
text-align:center;
font-family:微软雅黑;
}
p{
line-height:150%;
text-indent:28px;
font-family:楷体;
}
.box{
font-style:italic;
font-weight:bold;
text-decoration:underline;
}
</style>
</head>
<body>
<h1>习近平心中的互联网</h1>
<p>互联网是20世纪最伟大的发明,它正在将人类“<span class="box">一网打尽</span>”,人们在不知不觉中已经融入了互联网生态,互联网让世界变成了“鸡犬之声相闻”的地球村。</p>
</body>
</html>
new file
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>php.cn</title>
<style type="text/css">
h1{
color:red;
width:350px;
text-align:center;
font-family:微软雅黑;
}
p{
line-height:150%;
text-indent:28px;
font-family:楷体;
}
.box{
font-style:italic;
font-weight:bold;
text-decoration:underline;
}
</style>
</head>
<body>
<h1>习近平心中的互联网</h1>
<p>互联网是20世纪最伟大的发明,它正在将人类“<span class="box">一网打尽</span>”,人们在不知不觉中已经融入了互联网生态,互联网让世界变成了“鸡犬之声相闻”的地球村。</p>
</body>
</html>
Preview
Clear
- Course Recommendations
- Courseware download
The courseware is not available for download at the moment. The staff is currently organizing it. Please pay more attention to this course in the future~
Students who have watched this course are also learning
Let's briefly talk about starting a business in PHP
Quick introduction to web front-end development
Large-scale practical Tianlongbabu development of Mini version MVC framework imitating the encyclopedia website of embarrassing things
Getting Started with PHP Practical Development: PHP Quick Creation [Small Business Forum]
Login verification and classic message board
Computer network knowledge collection
Quick Start Node.JS Full Version
The front-end course that understands you best: HTML5/CSS3/ES6/NPM/Vue/...[Original]
Write your own PHP MVC framework (40 chapters in depth/big details/must read for newbies to advance)
















