Css回顶端

版权声明:转载请注明转载地址,谢谢! https://blog.csdn.net/softuse/article/details/90635029
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title></title>
    <link href="StyleSheet.css" rel="stylesheet" />
</head>
<body>
    <div id="updown" style="top: 420px; display: block;">
        <span class="up">1111111111111</span>
    </div>
    <script src="../wwwroot/lib/jquery/dist/jquery.js"></script>
    <script src="../wwwroot/js/scroll.js"></script>

    <p>
        1

    </p>
</body>
body {
  
    background: url(../wwwroot/themes/timg.png) no-repeat;
}
#updown {
	_top:expression(eval((document.compatMode&&document.compatMode=="CSS1Compat")?documentElement.scrollTop+documentElement.clientHeight-this.clientHeight-1 document.body.scrollTop+document.body.clientHeight-this.clientHeight-1));
	position: fixed;
	_position: absolute;
	top: 200px;
	right: 30px;
	display: none;
}

    #updown .up {
        background: url(../wwwroot/themes/timg.png) no-repeat;
    }

#updown .up:hover {
	background: url("../wwwroot/themes/timg.png") no-repeat -35px 0;
	transition: background 0.25s;
	-moz-transition: background 0.25s;/* Firefox 4 */
	-webkit-transition: background 0.25s;/* Safari 和 Chrome */
	-o-transition: background 0.25s;/* Opera */
}
    #updown span {
        cursor: pointer;
        width: 300px;
        height: 300px;
        display: block;
    }

猜你喜欢

转载自blog.csdn.net/softuse/article/details/90635029