我正在使用Laravel 5.6,在刀片视图中,我具有引导CDN来加载引导。
刀片文件:
<html>
<head>
<title>pie chart</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.0/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/bootstrap.min.css">
<style type="text/css">
.box{
width: 600px;
margin: 0 auto;
border: 1px solid #ccc;
}
</style>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
</head>
<body>
<div class="container">
<h3 align="center">Category Chart</h3>
<br>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-heading">Percentage of Categoryies</h3>
</div>
<div class="panel-body">
<div id="pie_chart" style="width:750px; height: 450px;">
</div>
</div>
</div>
</div>
</body>
</html>
但不加载引导程序。
该如何解决?
答案 0 :(得分:3)
您刚刚获得了错误的引导框架CSS链接,您需要在链接中添加缺少的css
部分:
https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/bootstrap.min.css
_______________________________________________^ HERE
应该是:
https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css
________________________________________________^^^
检查 official documentation 中的Bootstrap CDN部分。
<html>
<head>
<title>pie chart</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.0/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<style type="text/css">
.box {
width: 600px;
margin: 0 auto;
border: 1px solid #ccc;
}
</style>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
</head>
<body>
<div class="container">
<h3 align="center">Category Chart</h3>
<br>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-heading">Percentage of Categoryies</h3>
</div>
<div class="panel-body">
<div id="pie_chart" style="width:750px; height: 450px;">
</div>
</div>
</div>
</div>
</body>
</html>