html怎么用css
css常用代码?
CSS 可以通过以下方式添加到HTML中:
内联样式- 在HTML元素中使用"style" 属性
内部样式表 -在HTML文档头部 <head> 区域使用<style> 元素 来包含CSS
外部引用 - 使用外部 CSS 文件
外部样式
<link rel="stylesheet" type="text/css" href="路径.css">
内嵌样式
<style type="text/css">
#div{width:100px;height:100px;background:red;}
</style>
行内样式
<div style="width:100px;height:100px;background:red;"></div>