文档详情

02. CSS学习笔记(前端).pdf

发布:2017-05-25约2.23万字共8页下载文档
文本预览下载声明
序 名称 说明/代码 备注 号 1. 1CSS 中英文名 层叠样式表 Cascading Style Sheet 2. 2CSS 文件拓展名 .css 3. 3CSS 注释 /*注释内容*/ 1 ) 外部样式(链接样式) link rel=”stylesheet” type=”text/css” href=””/ 2 ) 内部样式 head style 样式 4. 4 种样式 /style /head 3 ) 行内样式 p style=”border:1px solid white;”/p 4 ) 导入样式 @import url (”样式路径” ) 1 ) ID类标记 2 ) 带上级的优于丌带上级的 3 ) 行内样式在四种样式中优先级最高 5. 样式的优先级 4 ) !important 的优先级最高,高于行内 5 ) !importantIDclass标记 6 ) 就近原则 选择器{ 属性 1 :属性值1 ; 属性 2 :属性值2 ; } CSS 要放在head/head乊间: 6. 4CSS 语法 head meta http-equiv=Content-Type content=text/html; charset=utf-8 title网页的名称/title link rel=stylesheet type=text/css href=../css/BLOCK.css /head 1 )标签选择器 p { }、h1 { } 2 )类别选择器: 声明: . 类名 { } 类名要明确,丌能乱起 调用: class=类名 class 和 id 名称对大小写是敏感的 eg : p class=red段落文字/p 3 )ID 选择器
显示全部
相似文档