我正在使用anki,我正在尝试插入“提示”和解释。我从 youtube 上的这个人那里获取了一个代码,他创建了这个代码——点击一个提示符号的可能性,然后才会显示提示的内容。这是视频的链接 - https://www.youtube.com/watch?v=Hv0IxQSYZiM 这是他写的我插入 Anki 的代码 - http://pastebin.com/raw/tqWNkeHV
我遇到的问题是我的提示中有多行/图像,这种方法不允许我以一种好的方式展示它们。该代码将只接收“提示”类别中的第一行,并且不会隐藏其余内容。看起来像这样 -
这是当前代码 -
{{Question}}
{{#Hint}}
<div id="hint" class="hidden">
<p class="trigger">[ click to show hint ]</p>
<p class="payload">{{Hint}}</p>
</div>
<script>
var hint = document.getElementById('hint');
hint.addEventListener('click', function() {
this.setAttribute('class', 'shown'); });
</script>
{{/Hint}}
这是造型 -
.card { font: 1.5em/1.5 sans-serif; text-align: center; }
#hint { background: #f2fbe7; border: 1px solid #dff5c4; border-radius: 6px;
color: #7a876b; }
#hint.hidden:hover { background: #dff5c4; color: #000; cursor: pointer; }
#hint.hidden .payload { display: none; }
#hint.shown { background: #fff; color: #000; }
#hint.shown .trigger { display: none; }
#hint.shown .payload { display: block; }
谁能帮我修改 JAVA / HTML 代码,以便我可以将所有行插入提示部分?非常感谢。