zoukankan      html  css  js  c++  java
  • 引用EChart和Bootstrap

    1.怎么引用Echart

    下载之后,写一个html,里面这样写

    <!DOCTYPE html>
    <html>
        <head>
             <meta charset="utf-8">
            <script src="echarts.min.js"></script>
            <title>蜀云泉</title>
            <h1 style="text-align: center;">蜀云泉的个人网站</h1>
        </head>
        <body>
            <div id="main" style=" 600px;height: 400px;"></div>
            <script type="text/javascript">
                //将echart初始化到div中
                var myChart=echarts.init(document.getElementById('main'))  ;
                //指定图表的配置项和数据
                var option = {
                title: {
                    text: '蜀云泉学ECharts'
                },
                tooltip: {},
                legend: {
                    data:['销量']
                },
                xAxis: {
                    data: ["衬衫","羊毛衫","雪纺衫","裤子","高跟鞋","袜子"]
                },
                yAxis: {},
                series: [{
                    name: '销量',
                    type: 'line',
                    data: [5, 20, 36, 10, 10, 20]
                }]
            };
                // 使用刚指定的配置项和数据显示图表。
                myChart.setOption(option)  ;
            </script>
        </body>
    </html>

    至于这个怎么写,直接去Echart找例子抄

    2.怎么引用Bootstrap

    先下载,bootstrap是需要jquery的

    然后这样调用

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8"> 
        <title>Bootstrap 实例 - 基本的表格</title>
        <link rel="stylesheet" href="css/bootstrap.min.css">  
    </head>
    <body>
    
    <table class="table">
        <caption>基本的表格布局</caption>
       <thead>
          <tr>
             <th>名称</th>
             <th>城市</th>
          </tr>
       </thead>
       <tbody>
          <tr>
             <td>Tanmay</td>
             <td>Bangalore</td>
          </tr>
          <tr>
             <td>Sachin</td>
             <td>Mumbai</td>
          </tr>
       </tbody>
    </table>
       <script src="jquery.js"></script>
        <script src="js/bootstrap.min.js"></script>
    </body> </html>

    也可以直接调用网上的接口,但是前提是有网,如果是在本地上玩玩的话还是用这种方式吧

  • 相关阅读:
    POJ
    POJ
    POJ
    POJ
    POJ
    ZOJ
    HDU
    python中主要存在的四种命名方式:
    python 中的 赋值 浅拷贝 深拷贝
    python中sorted方法和列表的sort方法使用
  • 原文地址:https://www.cnblogs.com/yunquan/p/7880040.html
Copyright © 2011-2022 走看看