Blogger Information
Blog 11
fans 0
comment 1
visits 7837
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
CSS视频教程,第4章CSS基本样式
鬼牛阿飞
Original
618 people have browsed it

课程目录
1 CSS背景
2 CSS文本
3 CSS链接
4 CSS列表
5 CSS表格
6 CSS轮廓

1 CSS背景

  1. div{
  2. background-attachment: ;/*背景图像是否固定随着页面的其余部分而滚动*/
  3. background-color: ;/*设置元素的背景颜色*/
  4. background-image: ;/*设置图片为背景*/
  5. background-position: ;/*设置背景图片起始位置*/
  6. background-repeat: ;/*设置背景图片是否重复*/
  7. }

知识点1:背景图像为什么总是从元素内边距左上角开始,因为background-position的默认值是0% 0%,功能上等同top left
知识点2:防止背景图像随着页面的滚动而滚动,通过属性声明图像相对于可视区是固定的(fixed)

2 CSS文本

  1. p{
  2. color: ;/*设置文本颜色*/
  3. direction: ;/*设置文本方向*/
  4. line-height: ;/*设置行高*/
  5. letter-spacing: ;/*设置字符间距*/
  6. word-spacing: ;/*设置字间距*/
  7. text-align: ;/*设置文本对齐方式*/
  8. text-decoration: ;/*向文本添加修饰*/
  9. text-indent: ;/*设置文本首行缩进*/
  10. text-transform: ;/*设置文本中字母*/
  11. unicode-bidi: ;/*设置文本方向*/
  12. white-space: ;/*设置元素中空格处置*/
  13. }

3 CSS链接

  1. a:link{color: #7FFFD4;}/*未被访问的链接*/
  2. a:visited{color: #8B4513;}/*已被访问的链接*/
  3. a:hover{color: #FF0000;}/*鼠标指针移动到链接上*/
  4. a:active{color: #FF9900;}/*正在被点击的链接*/

4 CSS列表

无序列表、有序列表前面的标记可以在css中通过list-style修改,其中文本修改用text-transform

  1. ul li{
  2. list-style: none;/*无标记*/
  3. list-style: disc;/*实心圆*/
  4. list-style: circle;/*空心圆*/
  5. list-style: square;/*方块*/
  6. list-style: decimal;/*阿拉伯数字*/
  7. list-style: decimal-leading-zero;/*0开头的数字标记*/
  8. list-style: lower-alpha;/*小写英文字母*/
  9. list-style: upper-alpha;/*大写英文字母*/
  10. list-style: lower-roman;/*小写阿拉伯数字*/
  11. list-style: upper-roman;/*大写阿拉伯数字*/
  12. list-style: lower-latin;/*小写拉丁字母*/
  13. list-style: upper-latin;/*大写拉丁字母*/
  14. }

5 CSS表格

  1. table tr td{
  2. border-collapse:;/*设置表格边框是否合并为单一边框*/
  3. border-spacing: ;/*设置分隔单元格边框的距离*/
  4. caption-side: ;/*设置表格标题的位置*/
  5. empty-cells: ;/*设置是否显示表格中的空单元格*/
  6. table-layout: ;/*设置是单元格是行和列的算法*/
  7. }

6 CSS轮廓

  1. input{
  2. outline: ;/*在一个声明中设置所有轮廓的属性*/
  3. outline-color: rgb(255,255,0);/*设置轮廓的颜色*/
  4. outline-style: double;/*设置轮廓样式*/
  5. outline-width: 10px;/*设置轮廓宽度*/
  6. }
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!