如何使子 div 成为位置绝对固定父容器的 100% 高度?
HTML
<div class="parent">
<div class="child">
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
CSS
.parent {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
Run Code Online (Sandbox Code Playgroud) 我正在使用代码拼写检查器,我想知道是否可以忽略被标记为“未知单词”的 Lorem Ipsum 文本,而不必添加列表中的每个单词"cSpell.userWords"。
我为静态主页编写了以下代码。在此,我想使用键入的库,该库包含在部分“head.html”中。但由于打字,我的内容不断跳跃。这是因为在某个时刻字幕容器是空的。我尝试添加默认占位符,但这似乎无法解决问题。
particlesJS.load('particles-js', '/json/particlesjs-config.json', function() {
console.log('callback - particles.js config loaded');
});
var typed = new Typed('#typed', {
strings: ['First, solve the problem', 'Some <strong>HTML</strong>', 'Chars × ©'],
typeSpeed: 0,
backSpeed: 0,
loop: true
});Run Code Online (Sandbox Code Playgroud)
<script src="https://cdnjs.cloudflare.com/ajax/libs/particlesjs/2.2.2/particles.js"></script>
{{ partial "head.html" . }}
<section class="hero is-info is-medium">
<div class="hero-head">
{{ partial "navbar.html" .}}
</div>
<div id="particles-js"></div>
<div class="hero-body">
<div class="container has-text-centered">
<p class="title">
</p>
<p class="subtitle inline-block" id="typed">
</p>
</div>
</div>
<div class="hero-foot">
<nav class="tabs is-boxed is-fullwidth">
<div class="container">
<ul>
<li class="is-active"> …Run Code Online (Sandbox Code Playgroud)