css知识点
2012-07-24 07:49
253 查看
css样式表:用法 常用属性 选择器
css主要有:元素内联(行内样式)<input /> 页面嵌入样式<style type=“text/css”> input {} </style> 外部样式<link href="css/stylesheet.css" rel="stylesheet" type="text/css"/>
样式的常用属性:background-color background-position background-border border-style:solid border-style:dotted border-color display元素是否显示 cursor鼠标显示的光标图标 盒子模型:margin边距 padding填充 border 选择器:标签选择器,class选择器,ID选择器,包含选择器P,组合选择器 伪选择器A:为标签的不同状态设定不同的演示
标签选择器 input { width:200px; }
class选择器 .cls { width:200px; } .cls1 { height:200px; border:solid 1px red; }
ID选择器 #btn { width:50px; color:red; }
组合选择器 .clss,#b1,p { width:50px; color:red; }
伪选择器 a.link { color:blue; }
a:visited { color:red; }
a.hover { text-decoration:underline; color:green; }
a.active { color:gray; }
发生冲突时就近原则 <body> <div class="cls cls1"> <div> <input class="cls" type="text"/><br/> <input id="btn" type="text"/><br/> <a href="dfgdfgd">baidu</a><br/> </body>
css主要有:元素内联(行内样式)<input /> 页面嵌入样式<style type=“text/css”> input {} </style> 外部样式<link href="css/stylesheet.css" rel="stylesheet" type="text/css"/>
样式的常用属性:background-color background-position background-border border-style:solid border-style:dotted border-color display元素是否显示 cursor鼠标显示的光标图标 盒子模型:margin边距 padding填充 border 选择器:标签选择器,class选择器,ID选择器,包含选择器P,组合选择器 伪选择器A:为标签的不同状态设定不同的演示
标签选择器 input { width:200px; }
class选择器 .cls { width:200px; } .cls1 { height:200px; border:solid 1px red; }
ID选择器 #btn { width:50px; color:red; }
组合选择器 .clss,#b1,p { width:50px; color:red; }
伪选择器 a.link { color:blue; }
a:visited { color:red; }
a.hover { text-decoration:underline; color:green; }
a.active { color:gray; }
发生冲突时就近原则 <body> <div class="cls cls1"> <div> <input class="cls" type="text"/><br/> <input id="btn" type="text"/><br/> <a href="dfgdfgd">baidu</a><br/> </body>
相关文章推荐
- CSS知识点个人总结(不断更新)
- css知识点
- 小知识点总结HTML、CSS、JavaScript(一)
- CSS知识点——可替换元素vs不可替换元素
- css中圣杯布局&双飞翼布局(以及css2零碎知识点)
- postcss 知识点备忘
- CSS知识点积累总结
- Web前端开发精品课HTML CSS JavaScript基础教程HTML部分知识点总结
- css知识点积累
- 前端面试知识点准备(HTML、css)
- css零星进阶知识点
- CSS易混淆知识点总结与分享-定位与布局
- 关于Html,Css,JavaScript知识点的简单梳理
- Codecademy上的HTML/CSS课程知识点总结(一)
- 移动端css基本知识点
- 17个css知识点整理【下】
- javascript,css,jquety知识点
- css-零散知识点
- CSS中Font的一些基本知识点归纳总结
- css中的float知识点总结