mui案例:导航栏 颜色渐变

mui导航栏 · 滚动渐变 · 代码参考

代码:

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>Hello MUI</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">

		<link rel="stylesheet" href="static.docs.v1.1/plugins/mui/css/mui.min.css">
		<style>
		</style>
	</head>

	<body>

		<header id="header" class="mui-bar mui-bar-transparent" style="background-color: rgba(255, 255, 255, 0);">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">导航栏</h1>
		</header>

		<div class="mui-content" style="height: 2000px;">
			
		</div>
		<script src="static.docs.v1.1/plugins/mui/js/mui.min.js"></script>
		<script type="text/javascript">
			mui.init({
				swipeBack: true //启用右滑关闭功能
			});
			var header = document.getElementById("header");
			var transparentApi;
			var slider = document.getElementById("slider");
			mui('.mui-input-group').on('change', 'input', function() {
				if (this.checked) {
					switch (this.value) {
						case 'left-none':
							document.getElementById("img1").className = "";
							document.getElementById("slider").classList.add("mui-hidden");
							break;
						case 'left-icon':
							document.getElementById("img1").className = "mui-hidden";
							if(slider.classList.contains("mui-hidden")){
								document.getElementById("slider").classList.remove("mui-hidden");
							}
							break;
					}
				}
			});
		</script>

	</body>

</html>

以上就是关于“ mui案例:导航栏 颜色渐变 ”的全部内容。

©️2020 CSDN 皮肤主题: 1024 设计师:上身试试 返回首页