我真的很新,所以我的知识总的来说很差。我正在尝试将 P5js 草图添加到 Bootstrap 模板中。理想的情况是能够构建一个响应式设计网站,其中包含一些带有 p5js 代码的图像和视频库。我已经使用我在网上找到的一个示例进行了一些测试,但我无法做到。我在这里附上代码https://codepen.io/llorencg/pen/LYVMLjZ任何帮助将不胜感激!谢谢 :)<html><head> <meta charset="utf-8"> <title>p5 walkthrough</title> <script src="//cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.5/p5.js"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.5/css/bootstrap.css"> </head><body> <nav class="navbar navbar-dark navbar-full bg-inverse" style=""> <a class="navbar-brand" href="#">Bootstrap and P5.js</a> <ul class="nav navbar-nav"> <li class="nav-item"> <a class="nav-link" href="#">A Link to Nowhere</a> </li> </ul> </nav> <div class="container"> <div id="jumbo-canvas" class="jumbotron"> <h1>Fun With P5.js</h1> <p class="lead">P5 is a JavaScript library that can be used to draw things onto an html canvas. The P5 reference guide can be found <a href="https://p5js.org/reference/">here</a>, and legendary videos by Daniel Schiffman can be found <a href="https://www.youtube.com/channel/UCvjgXvBlbQiydffZU7m1_aw">here.</a></p> <hr /> <p>By giving this div an id of jumbo-canvas and and placing <code>canvas.parent('jumbo-canvas')</code> in our setup function, we can draw inside this Bootstrap jumbotron.</p> <p class="lead"> <a class="btn btn-info btn-lg" href="#" role="button">Click this button for some truth</a> </p> </div> </div></body>
添加回答
举报
0/150
提交
取消
