前端 - bootsrap过渡效果终于实现了。。。。。

今天写了好长时间,出于马虎大意,没有实现了这个过渡效果,查了好多文章,都没有发现问题,后来才发现,有几个代码写错了,真的是,欲哭无泪,所以希望大家在敲代码的时候一定要认真,仔细,不然会很抓狂。

就是个小妖精,太折腾人了。

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<link rel="stylesheet" href="css/bootstrap.css">
	</head>
	<body>
		<div class="modal" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLable" aria-hidden="true">
			<div class="dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-label="Close">
							<span aria-hidden="true">&times;</span>
						</button>
						<h4 class="modal-title" id="myModallabel">Modal title</h4>
					</div>
					
					<div class="modal-body">
						content
					</div>
					
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal">close</button>
						<button type="button" class="btn btn-primary">save</button>
					</div>
				</div>
			</div>
		</div>
		<script src="js/jquery.min.js"></script>
		<script src="js/bootstrap.js"></script>
		<script>
			$('#myModal').modal("show");
		</script>
	</body>
</html>

还是要注意jquery.js要方法bootstrap.js之前。

那就欣赏下效果吧!!!   {<  _ >}

祝愿大家代码永无bug,加油!!! 

发布了60 篇原创文章 · 获赞 39 · 访问量 3770

猜你喜欢

转载自blog.csdn.net/qq_42992704/article/details/104281470
今日推荐