Twitter bootstrap 将引导程序2转换为ASP
当我将引导jquery从HTML转换为.asp页面时,我很难让它正常工作。我是否需要在我的文件中放入任何特定内容以使功能正常工作?这是我的标题:Twitter bootstrap 将引导程序2转换为ASP,twitter-bootstrap,twitter,Twitter Bootstrap,Twitter,当我将引导jquery从HTML转换为.asp页面时,我很难让它正常工作。我是否需要在我的文件中放入任何特定内容以使功能正常工作?这是我的标题: <!DOCTYPE html> <!--[if lt IE 8]> <html lang="en-us" class="ie7"> <![endif]--> <!--[if IE 8]> <html lang="en-us" class="ie8">
<!DOCTYPE html>
<!--[if lt IE 8]> <html lang="en-us" class="ie7"> <![endif]-->
<!--[if IE 8]> <html lang="en-us" class="ie8"> <![endif]-->
<!--[if IE 9]> <html lang="en-us" class="ie9"> <![endif]-->
<!--[if gt IE 9]><!--> <html lang="en-us"> <!--<![endif]-->
<head>
<title>Page Name</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="css/normalize.css" />
<link rel="stylesheet" href="css/bootstrap.min.css" />
<link rel="stylesheet" href="css/styles.css" />
</head>
<body data-spy="scroll" data-target="#scrollspyHook" data-offset="250">
这是我的剧本:
<script src="js/jquery-1.10.2.min.js"></script>
<script src="js/jquery.animate-colors-min.js"></script>
<script type="text/javascript" src="js/jquery.easing.1.3.js"></script>
<script src="js/bootstrap_modified.js"></script>
<script src="js/modernizr.custom.js"></script>
<script src="js/grid.js"></script>
<script>
$( document ).ready(function() {
// Schedule tabs
$("#scheduleTabs a, #planningTabs a").click(function (e) {
e.preventDefault();
$(this).tab("show");
});
// Animated jump links for main nav
$("a.scrollLink").click(function() {
var destination = $(this).attr("href");
$("body, html").stop().animate({
scrollTop: $(destination).offset().top-140
}, 1000);
return false;
});
// Animated/fixed navigation
$(window).scroll(function() {
if ($(document).scrollTop() == 0) {
$("#header").stop().animate({
backgroundColor: "transparent",
height: "auto"
}, 1000);
$("#header").css("position", "static");
$("#header").css("z-index", "auto");
$("#main-nav.nav-pills > li > a").css("line-height", "117px");
$("#main-logo").stop().animate({
width: "203px"
}, 1000);
} else {
$("#header").stop().animate({
backgroundColor: "#000000",
height: "70px"
}, 1000);
$("#header").css("position", "fixed");
$("#header").css("z-index", "10000");
$("#main-nav.nav-pills > li > a").css("line-height", "75px");
$("#main-logo").stop().animate({
width: "145px"
}, 1000);
}
});
$('.link').tooltip()
$('#myModal').modal(options)
});
</script>
您是否已将.css文件和.js文件包含到asp.net中的项目中 下载引导并解压缩zip文件。 将css、js和字体文件夹拖放到项目中。 在标题中添加这些引用
<link type="text/css" href="css/bootstrap.css" rel="stylesheet"/>
<script src="js/bootstrap.min.js"></script>
从下载jQuery。复制所有文本
右键单击js文件夹,使用jquery-2.0.3.js添加文件名,
打开它并在jQuery站点中粘贴所有已处理的文本。
把这个加到头上
<script src="js/jquery-2.0.3.js"></script>
现在它可以正常工作了。如果你还想添加到其他文件的链接