CSS的各種重要屬性,CSS重要屬性
CSS屬性圖
01文字屬性
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>文字屬性</title>
<style>
p{
font-style: italic;
font-weight: bold;
font-size: 10px;
font-family:"楷體";
}
</style>
</head>
<body>
<!--
02字型屬性補充
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>字型屬性補充</title>
<style>
p{
/*
被注釋掉的內容
*/
/*font-family:"亂七八糟的字型", "微軟雅黑";*/
/*font-family: Arial, "微軟雅黑";*/
font-family:"Microsoft YaHei";
}
</style>
</head>
<body>
03-文字屬性的縮寫
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>文字屬性的縮寫</title>
<style>
p{
/*
font-style: italic;
font-weight: bold;
font-size: 10px;
font-family:"楷體";
*/
font:bold italic 10px "楷體";
}
</style>
</head>
<body>
<!--
04-文字屬性
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>文字屬性</title>
<style>
p{
text-decoration: none;
text-align: left;
text-indent: 2em;
}
a{
text-decoration: none;
}
</style>
</head>
<body>
<!--
05-顏色屬性
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>顏色屬性</title>
<style>
p{
/*color: red;*/
/*color: rgb(255,0,0);*/
/*color: rgba(255,0,0,1);*/
color: #FF0000;
color: #F00;
/*color: rgba(255,0,0,0.2);*/
color: #ffee00;
color: #fe0;
color: #769abb;
}
</style>
</head>
<body>
<!--
關注公眾號
更多好內容
如果你覺得我的文章對你有協助,請支援我,你的支援是我最大的動力