CSS基本属性:css
文本html
a) scroll 背景图片随着页面的其他部分滚动web
b) no 背景图固定post
c) fixed动画
a) top 上url
b) right 右spa
c) bottom 下设计
d) left 左orm
a) 高度 百分比(若是只设置一个值,第二个被默认为auto)htm
b) 百分比 以父元素的百分比来设置高度
c) cover:把背景图扩展到足够大彻底覆盖背景区域,超出部分会被隐藏
d) contain:把背景图片扩展到最大尺寸使其高度彻底适应内容区域。
列表
a) circle 空心圆
b) square 方块
c) lower-roman 小写罗马字符
d) upper-roman 大写罗马字符
e) lower-alpha 小写英文字母
f) upper-alpha 大写由于字母
表格
2. cursor:pointer; 将鼠标设置为手型。
线性渐变
Transform、Transition、Animation之间的区别:
Transform:对元素进行变形;
Transition:对元素某个属性或多个属性的变化,进行控制(时间等),相似flash的补间动画。但只有两个关键贞。开始,结束。
Animation:对元素某个属性或多个属性的变化,进行控制(时间等),相似flash的补间动画。能够设置多个关键贞。
图片整理技术(Sprite图)
CSS sprite 是一种图片的处理方式,它容许网页设计师将不少张图片合并在同一张图档中,而后根据 CSS 档中的文字描述将图档分区块加载。如在一个div里,你能够设置在网页上显示这张图档中的某个区域的图片,而后根据用户的操做或选择改变在这个区域内显示的图片以及其余样式。其CSS样式示例代码以下:
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>雪碧图练习</title>
<link rel="stylesheet" href="testSprite.css"/>
<style>
.divClass{
width:90px;
height:100px;
background-image:url("images/1.png");
background-size:500px 800px;
}
.divClass:hover{
width:80px;
height:100px;
background-image:url("images/1.png");
background-size:500px 800px;
background-position:-50px 0; //-50表示右边的图向横坐标左移动50px而纵坐标上保持不变
cursor:pointer;
}
</style>
</head>
<body>
<div class="divClass"></div>
</body>
</html>