AmazeUI 光滑翻转实际效果的实✤例编码

2021-03-23 23:18 jianzhan

实际编码以下所显示:

<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>光滑翻转</title>
<!--[if (gte IE 9)|!(IE)]><!-->
<script src="assets/js/jquery.min.js"></script>
<!--<![endif]-->
<!--[if lte IE 8 ]>
<script src="assets/ie8/jquery.min.js"></script>
<script src="assets/ie8/modernizr.js"></script>
<script src="assets/js/amazeui.ie8polyfill.min.js"></script>
<![endif]-->
<script src="assets/js/amazeui.min.js"></script>
<link rel="stylesheet" href="assets/css/amazeui.min.css">
</head>
<body style="margin:300px;">
<!-- $('html, body').animate({scrollTop: 0}, '500'); //适配老版IE的书写 -->
<div style="height: 2000px;"></div>
<!-- 翻转到顶端 -->
<button data-am-smooth-scroll class="am-btn am-btn-success">翻转到顶端</button>
<!-- 翻转究竟部 -->
<button id="doc-scroll-to-btm" class="am-btn am-btn-primary">翻转究竟部</button>
<script>
  $('#doc-scroll-to-btm').on('click', function() {
    var $w = $(window);
    $w.smoothScroll({position: $(document).height() - $w.height()});
  });
</script>
<!-- 界定选择项 -->
<button data-am-smooth-scroll="{position: 57, speed: 5000}" class="am-btn am-btn-danger">慢吞吞地滚到间距顶端 57px 的部位</button>
<!--根据 Data API-->
<!-- 在原素上加上 data-am-smooth-scroll 特性。 -->
<button data-am-smooth-scroll class="am-btn am-btn-success">翻转到顶端</button>
<!-- 假如要特定翻转的部位,能够给这一特性设一个值。 -->
<button data-am-smooth-scroll="{position: 189}" class="am-btn am-btn-secondary">特定翻转的部位</button>
<!--
根据 Javascript
$(window).smoothScroll([options]);
// 翻转究竟部
$('#my-button').on('click', function() {
  var $w = $(window);
  $w.smoothScroll({position: $(document).height() - $w.height()});
});
-->
<div style="height: 2000px;"></div>
</body>
</html>

实际效果图:


 

到此这篇有关AmazeUI 光滑翻转实际效果的实例编码的文章内容就详细介绍到这了,大量有关AmazeUI 光滑翻转內容请检索脚本制作之家之前的文章内容或再次访问下边的有关文章内容,期待大伙儿之后多多的适用脚本制作之家!