前端开发常见需求处理方法
1. 设置页面鼠标样式
*{
cursor: url("../images/cursor.png"),default;
}
a:hover{
cursor: url("../images/cursor_hover.png"),pointer !important;
}
2. 设置网页背景固定,当滑动时内容滑动,背景不变(如本博客网站背景样式)
body {
background: url("../images/bg.jpg");
background-position: center center;
background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover;
}