javascript - 如何将particles.js添加到布尔玛英雄背景?
问题描述
我得到了要加载的particles.js,但它会将bulma 英雄向上推,而不是替换英雄背景。有什么解决办法吗?
#particles-js{
position: absolute;
width: 100%;
height: 100%;
background-image: linear-gradient(to bottom right, #ad5389, #3c1053);
}
<section class="hero is-fullheight" id="particles-js">
<div class="hero-body">
<div class="container has-text-centered">
<h1 class="title has-text-light is-size-1">iOS application development</h1>
<a class="button is-light is-inverted is-outlined">Learn More</a>
</div>
</div>
</section>
<script type="text/javascript" src="js/site.js"></script>
<script src="js/particles.js"></script>
<script src="js/app.js"></script>
解决方案
我用过:
#particles-js canvas{
position: absolute;
height: 100vh;
z-index: -1;
}
推荐阅读
- r - R中的马尔可夫链模型:返回0转换值
- swift - Swift 4 - 在操场上准确获得大阶乘
- php - 获取 Woocommerce 中特定属性键值对的变体
- c# - 如何在 C# 的自属性对象中使用验证?
- json - 构建下拉列表并从 URL 动态获取 JSON 数据的最佳方法是什么
- html - 内容覆盖的下拉菜单
- owl-api - 如何使用 OWLReasoner 更新本体
- javascript - 减少方法 - 无法获得两个单独的结果
- java - 带有 TestCase JUnit 的 GradleException
- web-services - docker swarm - Leader(Manager) 节点服务端点和负载均衡