前端开发常见需求处理方法

前端开发常见需求处理方法

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;
}

版权声明:本文为博主原创文章,转载请附上博文链接!
原文地址:https://www.cnblogs.com/zq98/p/15027901.html