文章目录
CSS使用的三种方式
内联定义方式
实现代码
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSS样式:内联定义方式</title>
</head>
<body>
<div
style="width: 300px;height: 300px;background-color: blue;border-color: chartreuse;border-width: 10px;border-style: solid; display: none;">
</div>
<div style="border:yellow solid 10px; width: 300px; height: 300px; background-color: black;"></div>
</body>
</html
实现结果
样式块方式
实现代码
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSS 样式块</title>
<style type="text/CSS">
#password{
font-size: 100px;
color: darkorange;
}
</style&