CSS备忘-1

CSS 可以通过以下方式添加到HTML中:

  • 内联样式- 在HTML元素中使用"style" 属性
  • 内部样式表 -在HTML文档头部 <head> 区域使用<style> 元素 来包含CSS
  • 外部引用 - 使用外部 CSS 文件
<p style="color:blue;margin-left:20px;">This is a paragraph.</p>
<head>
<style type="text/css">
body {background-color:yellow;}
p {color:blue;}
</style>
</head>
<head>
<link rel="stylesheet" type="text/css" href="mystyle.css">
</head>
原文地址:https://www.cnblogs.com/jixinyu/p/4315484.html