前端笔记——简单记录

20201105

1. 实现基本的网页布局的知识点

  1. 盒子模型
  2. 浮动float
  3. 清除浮动clear

20201106

1. 背景设置为本地图片并横向重复

background: url(../images/XXX.jpg) repeat-x;

2. 块级盒在页面内水平居中

margin: 0 auto;

3. 指定一张图片作为列表的标识

list-style-image: url(../images/XXX.jpg);

4. 让文字垂直居中

内联级盒的的高度就line-height,而字的高度是由font-size决定,
首先,要保证line-height>font-size
然后,设置行高line-height和外面的块级盒高度height相同就可以实现文字的垂直居中

5. 用交互伪类改变超链接的行为

/*设置点击前和点击后都是一个颜色,并去掉下划线*/
top_content a:link, 
.top_content a:visited {
    color: #8E8E8E;
    text-decoration: none; 
}
/*设置在悬停和激活时变红色并没有下划线*/
.top_content a:hover, 
.top_content a:active {
    color: #900; 
    text-decoration: none; 
}
posted @ 2020-12-05 23:38  叶落未落  阅读(107)  评论(0)    收藏  举报