前端笔记——简单记录
20201105
1. 实现基本的网页布局的知识点
- 盒子模型
- 浮动float
- 清除浮动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; 
}
 
                    
                
 
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号