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

时间:2021-07-19 16:49:52   收藏:0   阅读:0

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

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

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!