我正在使用XHTML在Confluence中使用python编写页面,我希望有一个新页面包含一个段落,当人们进入该页面时该段落被隐藏或被截断,但是如果人们单击它,可以看到它。请检查我所附的两张图片,以便更好地说明我想要的内容
您可以使用jquery实现此目的。假设您使用的图标来说明这三个点。
<style>#hidden_para{display:none;} /* Hide the paragraph*/</style>
<script src="https://code.jquery.com/jquery-3.5.0.js"></script>
<script type="text/javascript">
$("#icon").click(function(){
$(this).hide(); //the 3 dotted icon
//Add an ID attribute to your hidden paragraph.
$("#hidden_para").show();
});
</script>